faqts : Computers : Programming : Languages : PHP : Installation and Setup : Security

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

15 of 19 people (79%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Why do upload and copy dirs have to have execution allowed?

Jun 13th, 1999 07:00
Nathan Wallace, Peter Bolmehag, Christopher W. Curtis


I have apache 1.3.6 and php3.0.9. Apache runs as nobody and nobody is a
member of the unix group called "www". So my web hierarchy is all in
group "www". Now when uploading and copying a file from /tmp  with the
php functions I get a "permissions denied".

The only way I can solve it is to make the directory I am copying the
file to chmod g+wrx, chmod g+rw only does not work.

A directory has to have execute permissions in order to "cd" to it.  PHP
is trying to change to that directory before doing the copy.  So PHP
requires that these directories have execute permission.