Hi,
I'm testing some code with apache2, the perchild mpm & php-4.3.4, and
safe_mode turned on.
I was testing a simple script, which is ...
.....
rename ("./moo", "/tmp/crap");
print ("done....");
.....
So, if i touch moo I get the file with the following permissions...
-rw-r--r-- 1 daveb noc 0 Jan 19 12:03 moo
Then I run the script and it ends up moving to /tmp...
daveb at bilbo:~$ ls -la /tmp/crap
-rw-r--r-- 1 daveb noc 0 Jan 19 12:03 /tmp/crap
>From my reading of http://ie.php.net/manual/en/features.safe-mode.functions.phprename() should
"Checks whether the directory in which you are about to operate has the
same UID (owner) as the script that is being executed."
But on my desktop, root owns /tmp (i've even removed the sticky bit from /tmp,
but no change).
So, am I doing something wrong? My reading of the documentation says that php
should barf, because the script is owned by me, but /tmp isn't.
Cheers,
Dave
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!