I have a relative folder 'files/crm-upload', where i want to upload files. My code checks, whether is_writable() is true and only proceeds if this is the case.
The folder is mounted as a NFS share with rw and sec=sys.
I have written a test script, which i also execute on the apache to see access rights, it's result:
files/crm-upload/php_touch modification time has been changed to present time
My effective UID is 33 but my UID is really 33
files/crm-upload/ is owned by 33 and has permissions 40777
is_readable('files/crm-upload/') gives true
is_readable('files/crm-upload/php_touch') gives true
is_writable('files/crm-upload/') gives false
is_writable('files/crm-upload/php_touch') gives true
is_writable('files/crm-upload/25/') gives true
is_writable('files/images/') gives true
file_exists('files/crm-upload/') gives true
file_exists('files/crm-upload/php_touch') gives true
Some stat uids:
files/crm-upload/: 33
files/crm-upload/php_touch: 33
files/images/: 33
So:
- touching a file on the share works
- uids are correct
- dir has correct permissions
- is_writable for subfolders and files on the share returns true
How can this be, that only the root folder of the mounted share is not writable and everything else is?
It is a ubuntu 18.04. client, there is no SELinux running...
Thanks for help!
from PHP is_writable false for NFS-share, even though it is writable for the user www-data
No comments:
Post a Comment