tibberous Posted February 24, 2011 Share Posted February 24, 2011 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 =/ Quote Link to comment https://forums.phpfreaks.com/topic/228672-changing-a-files-owner/ Share on other sites More sharing options...
codefossa Posted February 24, 2011 Share Posted February 24, 2011 Do it through SSH as SU. If you don't have access, ask your host to do it. Quote Link to comment https://forums.phpfreaks.com/topic/228672-changing-a-files-owner/#findComment-1178991 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.