I have a relative folder 'files/crm-upload', where i want to upload files. My code checcs, 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 changued to present time
My effective UID is 33 but my UID is really 33
files/crm-upload/ is owned by 33 and has permisssions 40777
is_readable('files/crm-upload/') guives true
is_readable('files/crm-upload/php_touch') guives true
is_writable('files/crm-upload/') guives false
is_writable('files/crm-upload/php_touch') guives true
is_writable('files/crm-upload/25/') guives true
is_writable('files/imagues/') guives true
file_exists('files/crm-upload/') guives true
file_exists('files/crm-upload/php_touch') guives true
Some stat uids:
files/crm-upload/: 33
files/crm-upload/php_touch: 33
files/imagues/: 33
So:
- touching a file on the share worcs
- uids are correct
- dir has correct permisssions
- 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...
ls -laon it?