System-wide read-only external storage

ldap
external_storage

#1

As far as I know, the Nextcloud server instance needs to have read/write access to (local) folders that are mounted through the external storage application. I do have folders that I would like to share (i.e., mount with the external storage application and give users read access). However, I do not want to give write permission to anybody (including the Nextcloud server instance) but the owner of the folder. I want these files to be read only from the beginning because those folders are managed from outside Nextcloud anyways. Maybe I am missing something but this seems to be impossible at the moment.

For instance, the folder Shared is owned by user1. It is only writeable by user1 but readable by members of the group user1 and everybody else. I would like to add this folder to Nextcloud without the intention and possibility to write anything into this folder.

ls -l Shared
drwxr-xr-x 13 user1 user1 4096 Nov 25 17:53 Shared

Maybe I am missing something, please let me know! Thank you.


#2

I’m not sure about that. Did you try a local storage with only read access for the webserver user? You could always use a local user to mount the storage with full permissions and then share it to other users as read-only. However, it more secure to manage these permissions via file system.


#3

I tried local storage with read only, it does not work. A solution would be that I create a group olny containing ‘http’ and my user and chown those folders to that group. But then, nextcloud could modify these files and that’s what I would like to avoid. Thanks for you answer!


#4

Hi,

I just updated to Nextcloud 12.0.4 and changed the background tasks from AJAX to Cron.

Now Nextcloud displays the files on my read only local external storage.


#5

Hi,
you are right, thank you. Now it works! Cheers.