Ah yes my brain was tired..I meant chown. I want to change the ownership
of the newly created file to an existing user. The form has a field
where they input their login name and the nam,e of the newly created
directory. The PhP script is passed teh varibles but fails to change
ownership to the valid login name which is supplied on the form....The
script gives an error saying the command is not permitted and gives the
line number where the chown command is given.
Si first the directory is made with ownership nobidy.nobody and then the
script tries to change the ownsership tot he supplied login name via
Henrik Hudson wrote:
>First off, to change ownership you want "chown", not "chmod". Also, chown
>isn't always permitted depending on the cicrumstances of who owns the
>directory or the specific file to begin with.
>If you're web server is running as nobody it will only be able to create files
>in a directory owned by nobody (or world writable...but that's stupid) or
>modify a file that already exists and owned by nobody.
>If I may ask, what are you trying to change the ownership for / to?
>On Wednesday 10 April 2002 02:06, John Weez wrote:
>>Hi all...I want to change the ownership of a file that is created via
>>php..so i uses chmod command in my php script.. Upon execution of the
>>script i get an error saying command not permitted with a line number
>>pointing to my chmod command.
>>I'm running apache as user nobody for security reasons.
>>any hints as to how i can get chmod to work would be great...