Jump to content

Changing a files owner


tibberous

Recommended Posts

I am trying to create a file, then give it to the linux user 'templates'.

 

I can create it, chmod it to 777, but can't change the owner from apache.

 

If I do:

chown("/home/templates/file.php", "templates");

 

I get an operation not permitted error. If I do:

 

shell_exec("chown -R templates /home/templates/file.php");

 

I don't get an error, but it also doesn't work. Guessing this is some kind of stupid security thing - anyway around it? Right now I'm just setting everything to 777 =/

Link to comment
https://forums.phpfreaks.com/topic/228672-changing-a-files-owner/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.