External storage Read/Write permission

Hello,

Is there a way to define read only or write permission on local external storage depending of the nextcloud user group ? (like we can with shared folder).

At the moment, when i’m configuring a group to access this external storage, all members can read/write.

Regards,

Hello,

Nobody on this topic ? :sweat:

You have to options:

  • mount external storage as user (with full access), then share with each group individually and grant permissions
  • mount external storage for each user individually, then use the external storage’s permissions to control access (create read and r/w user, use LDAP, …)

why is this in the app section? Do you want to access files via an app?

Because i’d like to use the External Storage app in nextcloud to manage permission, not the OS. So I can use nextcloud user & group.

At the moment, as admin, I can configure an external storage and specify users & groups that it would be available for, but not permission for each group.

If I well understood, what you suggest is not from nextcloud point of view but the OS…

Ok, I see that is when you mount external storage from the admin-interface. But you can also include external storage for the admin-user via his personal page. Then on the file-view, you can share the external folder with more detailed permission settings.

But you can also include external storage for the admin-user via his personal page. Then on the file-view, you can share the external folder with more detailed permission settings.

Very interesting but to do so, we need to allow users mounting external storage (even for the admin) in the admin panel. This would allow any user to do so, not really my objective here but that could be a solution.
But when you allow users mounting external storage, they can’t choose "local’ type (fortunately because they would have full access to the OS directories). Even the admin can’t use it and share this type for a specific local directory.

Other idea, use the mounting from the admin-interface but only mount it for the admin user. Then go to the file view and share the external folder.

Other idea, use the mounting from the admin-interface but only mount it for the admin user. Then go to the file view and share the external folder.

It is almost what I want to do ! I didn’t think about that ! The only thing with this solution is that we need to activate “resharing”.

But i think using this + the option of “not allowing some group to share” + “allow sharing intra group only”, I could be able to do what i’m trying to.

Thanks tflidd !

Edit: actualy, i just saw i can enable “sharing” directly from the external storage configuration for a specific directory whitout enabling the global option “allowing re-sharing” in admin panel. This is exactly what i was looking for, now I can handle permission from the admin on this local external storage! Thanks again!

At least under linux, you can use bind mount. For example, you mount the /srv directory in a /srv-ro directory like this (here with /etc/fstab but it also works with the mount command):

  • with util-linux<2.27
    /srv /srv-ro none bind 0 0
    /srv /srv-ro none remount,bind,ro 0 0

  • with util-linux>=2.27
    /srv /srv-ro none bind,ro 0 0

Then you can use /srv-ro as an read-only external storage.

As an admin when you create an external storage mount point in the external storage app you can select read only in the permission on the right as well as authorizing sharing. You can then add the user for them to see the storage. Further access will be defined by the authentication they use for the storage.