Reputation: 1045
I'm having a problem after upgrading php 8.1 to 8.3 (fpm) in my Ubuntu 22.04
I'm getting "chmod(): Operation not permitted" in CodeIgniter, craftCMS and other web apps.
Those web-apps are hosted in a ntfs partition mounted to /media/www as shown from my /etc/fstab file
UUID=58AA44XXXA3421C /media/www ntfs-3g uid=myuser,gid=mygroup,nls=utf8,umask=002,windows_names 0 0
Therefore, I cannot exec sudo chown -R myuser:www-data (and/or similar commands) in this folder.
PS: My user belongs to www-data etc. This was not happenning on php8.1
Is there any setting I could change in php.ini or similar that can make this work?
I'm trying everything along with this little sample code, but any solution found on Google, Gemini, chatGPT etc. works
<?php
// the txt file exists
$file = './example.txt';
// Change the permissions of the file
if (chmod($file, 0644)) {
echo "Permissions changed successfully!";
} else {
echo "Failed to change permissions.";
}
Thanks
Upvotes: 1
Views: 57