spires Posted September 2, 2009 Share Posted September 2, 2009 Hi guys, I'm trying to change the permissions of a file on my server using PHP. I'm on a Linux server. The file is currently 0644 and I'm trying to change it to 0777. chmod('file_permissions.php', 0777); echo substr(decoct(fileperms('file_permissions.php')), 2); However, it's still echoing out 0644. I've even checked the file permissions on the server and they are still 0644 also. Any ideas? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/172807-chmod-not-working/ Share on other sites More sharing options...
JonnoTheDev Posted September 2, 2009 Share Posted September 2, 2009 supply the full path to the file and make sure that permissions / ownership are avaialble to perform this action. chmod('/path/to/file.php') Quote Link to comment https://forums.phpfreaks.com/topic/172807-chmod-not-working/#findComment-910846 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.