Thanks to all who explained it to me. Sorry if I inadvertently hijacked the thread.
--- Jason Wong <[EMAIL PROTECTED]> wrote: > File and directory permissions (so that people searching the > archives have > something to look for). > > > That is correct. According to the docs, if the directory is not > > executable, you can't even get the permissions on the files in > it. > > I'm confused, though. > > 1) To be able to _access_ a directory and its contents you need at > minimum, > execute permissions, on all directories in the path. > > 2) To be able to create files (ie write _new_ files) in a > directory, you need > write permission for the directory in which the file is to be > created (as > well as (1)). > > 3) To be able to change the contents of existing files you need (1) > and you > need write permissions on the file that you want to change. > > 4) To be able to rename files, you need (1) and read permissions on > the source > files and (2) on the destination directory. > > 5) To be able to _list_ the contents of a directory (as opposed to > just having > _access_) then you need (1) and read permissions on that directory. > > > > -Doesn't PHP run as some user? > > Yes, usually as the user which runs the webserver. > > > -Is the issue giving that user execute permissions in the web > root? > > Not just execute, you need write as well. > > > -Why the concern about letting that user have execute > permissions, > > and then prevent anyone (execpt those that have valid reasons) > from > > having write/execute permission to the webroot. > > Because in many shared-hosting environments, such an arrangement > will mean > that your fellow co-hosts will be able to read/write/trash files in > your web > space. > > That is why it was suggested that the OP used the FTP functions to > write the > files into his own web space. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications > Development * > ------------------------------------------ > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > ------------------------------------------ > /* > Stone's Law: > One man's "simple" is another man's "huh?" > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== Mark Weinstock [EMAIL PROTECTED] *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *************************************** __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php