External Storage: files & dirs created with wrong permissions

So I posted a file on my computer today. And when it got uploaded the group STILL did not have write permissions. This is a real problem for me. I am just wondering if there are any plans to fix this ever?

Has this ever been addressed? I have the same issue. My files are created with 644 instead of 666 like Unraid needs it to work for the samba shares…

Since 2018, there are seems some workaround exist: Allow the UID/GID to be changed · Issue #359 · nextcloud/docker · GitHub

Yes, the UID and GID issue has been addressed. However, I am still unable to tell my Nextcloud instance to write files with a specific UMASK. I need the files to be written with 666 (i.e. UMASK 000) but there is no way for me to achieve this since the Docker-Variable doesn’t seem to do anything :confused:

According to what I see in source file www/nextcloud/lib/private/Files/Storage
umask 022 is hardcoded to all file operations
I would assume to give an option to change it via settings / env var, so we may use external mounted storage simultaneously with cloud access
I need permission to be 664 instead of 644 for (umask = 002) files created via nextcloud so they are accessible for users from group.

still you may change it manually in this file to 002 or whatever you need. it’s just in 3 places there

Issue resolved in version 25+
Just add to config.php
‘localstorage.umask’ => 002,
it will make new files group writable.

2 Likes

It was actually proposed a while ago but never backported for some reason. Link to the original PR https://github.com/nextcloud/server/pull/32723