473,473 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Rights issue / safe mode PHP

(Suse 9.0, Apache 2.048, PHP 4.3.3 - all default install from SuSe ISO)

I have in my wwwroot folder (/srv/www/htdocs) a folder called counters.
I have embedded a page counter script into several of the webpages I
wrote/maintain.

ls -lias for htdocs, and below the one for htodocs/counters
5197 1 drwxr-xr-x 8 pjotr root 480 Aug 1 09:36
htdocs
131618 2 drwxrwxrwx 2 pjotr users 1592 Aug 3 17:23
counters

If I run the counter.php script from a browser (embedded) the counter txt
file is owned by the web server process:
131651 4 -rw-r--r-- 1 wwwrun www 2 Aug 3 13:41
test.counter.txt

If I removed the rxw rights for other on counters, the script fails. So far
I get it, since wwwrun is not in group users.
But then i though, why not change ownership of counters to wwwrun, group to
www and remove rxw for all others.

So I gett
131618 2 drwxrwxrwx 2 wwwrun www 1592 Aug 3 17:23
counters

But even before removing rwx for others I get the following error when
running the counter script:
Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is
500 is not allowed to access /srv/www/htdocs/counters owned by uid 30 in
/srv/www/htdocs/counter.php on line 26

Tempting as it is to disable SAFE MODE I know that is probably not good
practice. What am I missing here ? I just don't get this.
Peraps my entire security setup is not good for this server. Do I have to
change ownership of the higher directories as well ?
I am not too happy about a directory writable and executable to all the
world. I can hardly imagine that is safe practice.
So any help appreciated.

TIA
Pjotr
Jul 17 '05 #1
0 1604

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Giobibo | last post by:
Hi. I want to send mail with the function mail(). I am on a shared server in SAFE MODE. When I send a mail I get the message: "SAFE MODE Restriction in effect. The fifth parameter is...
0
by: Yemi | last post by:
Hi There. I seem to be getting some inconsistent results when using passthru() in safe mode. They appear to be related to the fact that passthru should treat all command arguments as one single...
3
by: Jeremy Shovan | last post by:
What do I need to change to use the opendir() function when safe mode is in affect?? I have root access to the server and can make any changes neccessary except turn safe mode off Thanks in...
2
by: Paul Schmidinger | last post by:
Hi, I created a directory with PHP mkdir (mode 0777). Then I try to move_ulpoaded_file() to move a file into this directory. I get an error: Warning: move_uploaded_file(): SAFE MODE...
0
by: Zuel | last post by:
Sup everyone! I wrote this code for Tomcat appserver but I am told from an associate that it has threading issues. The basic idea is to store a read only data table for everyone to use. It...
2
by: Joseph S. | last post by:
Hi all, Consider this case: I have a free php hosting account (a LAMP host) with an account name (also the name of my directory) 'sample'. Under 'sample', I have php scripts which can create...
8
by: Gary Nastrasio | last post by:
If I compile with /clr:safe, which is exactly meant by saying I can't use "Native Types" in my code? Is a native type something such as float, short, or int? Thanks, Gary
5
by: rdlowrey | last post by:
Hi, I'm pulling my hair out trying to make this work and any help would be appreciated ... When I try to move the uploaded file: move_uploaded_file($_FILES,"/var/www/vhosts/...
7
by: bvdp | last post by:
I'm finding my quest for a safe eval() quite frustrating :) Any comments on this: Just forget about getting python to do this and, instead, grab my set of values (from a user supplied text file)...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.