Changing file owner in PHP script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MattSharp
Forum Commoner
Posts: 62
Joined: Wed Apr 24, 2002 2:25 pm

Changing file owner in PHP script

Post by MattSharp »

I am having a problem when using a file upload script. The script sets itsel f and as the owner and group and the script never needs to use the file again. Other users on the network need access to the file and be able to eventually delete it. I have to go in and manually change the owner of the file to allow the user to delete it. So I need a way to change the owner of the file, but chwon function is useless since you must be root to do it and the script isnt root.

This may actually be more a linux admin question but if there is a way I can do it in the script it would be nice.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Maybe you could provide access to the file via a php script and FTP fns?
Post Reply