>>>>> "Super" == Super Steve <[email protected]> writes:
Super> I am finding that my PHP script can't write to the upload
Super> directory to copy the uploaded files into it. If I change
Super> the permissions on the upload directory to 777 (everyone
Super> can do everything) then the PHP script can write to the
Super> upload directory. But of course I don't really want to
Super> allow everyone to write to the upload directory,
Why not? As this is a "public" internet, it's basically what happens
anyway.
Super> I'd much rather have the permissions set to 775 to prevent
Super> public from being able to write to the directory.
Super> I am guessing that the reason I am seeing this behaviour is
Super> because my PHP script is being run by Apache, and the
Super> Apache username and group is set to "nobody".
That's true.
Super> What are your recommendations for setting permissions on a
Super> directory so I can allow my PHP scripts (run by Apache) to
Super> write to the directory but without resorting to setting the
Super> permissions to 777 which allows anyone to write to the
Super> directory? Should I be changing the owner or group on the
Super> directory? If so what should I be changing it to and how
Super> should I change this since I don't have telnet access? I
Super> would still like to have full FTP access to the directory
Super> as well.
Best would be to change the upload directory to the Apache user, which
you can't as you don't have root access.
I.e. you want to have read/write for the Apache user.
--
Cheers,
Berend de Boer
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]