So I have mounted a legacy owncloud folder over nfs to this machine. Php is running a pool as the user 'nextcloud' and all files are owned by this user and the group permissions are for 'www-data' (as which the webserver is running). If I su nextcloud I can read/write everything on this share.
However when I browse to nextcloud I end up with the typical Your data directory is not writable and I have no idea why this is so.
Operating system: debian/yunohost
Web server: nginx
Database: mysql
PHP version: 7.0
Nextcloud version: 13.0.5
GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/9888 (Using local mounted NFS share with External storages does not work properly ), https://github.com/nextcloud/server/issues/8162 (External storage mount silently fails when http user has no rx access on folder), https://github.com/nextcloud/server/issues/7959 (Failed to remove sensitive data), https://github.com/nextcloud/server/issues/5471 (mount.cifs as data directory), and https://github.com/nextcloud/server/issues/9838 (Share folder failed on readonly storage).
I'm not using this as 'External storage'. It is mounted on the host machine and used directly as data folder.
So, according to folks in #php irc channel the is_writable() check is "known to return unusable results on file systems with less than trivial ACL setups." and for a proper check it should "actually try to open a file with write permissions".
So there you go. Hereby I propose that is_writable() is replaced with a function that actually tries to check write-permissions by writing a file.
cc @icewind1991 :)
This issue has been automatically marked as stale because it has not had recent activity and it seems to be missing some essential informations. It will be closed if no further activity occurs. Thank you for your contributions.
If this is not marked as fixed then it is still an issue.
Most helpful comment
So, according to folks in #php irc channel the
is_writable()check is "known to return unusable results on file systems with less than trivial ACL setups." and for a proper check it should "actually try to open a file with write permissions".So there you go. Hereby I propose that
is_writable()is replaced with a function that actually tries to check write-permissions by writing a file.