Jump to content

chmod not working?


spires

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/172807-chmod-not-working/
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.