better permission control for external storage (maybe bug) #25965
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
enhancement
Nice to have
my scenario
I have a local directory exposed in NC21 as external storage. It is a normal filesystem (BTRFS) which can get pretty busy, meaning that other processes and users read and write there too. Let us say one of those other users is
labsync
. I want to make the data available (read and write) to NC as external storage. This works.However, I also would like be able to add data with NC, ie. the user
nextcloud
, that can be fully edited usinglabsync
. This does not seem possible without having to write for instance a cron job that takes care of permissions.default permissions
For demonstration, I created a file
asdf.md
and a directoryasdf
in the NC webUI.The default file creation permission on the external storage from NC seems to be
rw
for both user and group. With some appropriate access control forlabsync
(heresetfacl -R -d -m u:labsync:rwX -m g:labsync:rwX
), I get thiswhich can be fully accessed by
labsync
.However the defaults for directories seem to be
rwx
andr-x
for user and group, respectively (andr-x
for others), which results inThis means
labsync
cannot change or delete directories because of the mask that NC is using.I tried to change umask to 0002 for my
php-fpm
service which did not change the above permission. I thought this was weird, therefore the "(maybe bug)".However, doing the following actually gives me the correct directory permissions (for
labsync
, ie. full access):conclusion
I wished it were possible to set the mask for external storage with a bit more control, if not at all. Right now, I do not see how to correct this issue (without a cron job) and where the permissions are actually set. Another interesting thing is that the permissions of personal files, ie. not in external storage, differ from the above for files, where they are
-rw-r--r--
.The text was updated successfully, but these errors were encountered: