External storages : Sharing management, Upload and Delete

Hello,

I’m running a Nexctcloud instance in a Docker container on Openmediavault (18.0.2).
I set up external storage folders using Samba => I would like to have all the Nextcloud files stored in these folders (on the RAID drive of my NAS (and keep the system SSD as it is))

Unfortunately, I’m experiencing a few issues with this set up :

  1. It seems that I cannot manage the access rights on these folders : When I create a new user, it has access to all the external storage folders by default (shared bu default ?) and I didn’t find the way to manually grant/refuse access to these folders. Is that normal ?

  2. When using Sharing links on these folders : I always get this error message “An unknown error has occurred” (but most of the time, the file is uploaded anyway.

  3. When using Sharing links on these folders : It is impossible to delete files : “Error deleting file “{fileName}”.”

Can you please help me ?
Is there a better way to do it ?

Thank you ! :slight_smile:

As far as #1, when using SMB, the rights are controlled by the SMB server. In other words if you use SMB user joe to access the SMB storage from Nextcloud, then user joe’s rights determine what can be done on the external storage.

In other words, from the SMB server’s perspective, user joe has connected to the share. Could be from Windows. Could be from Linux. Could be from Nextcloud. It doesn’t know or care. Anything done while logged in as user joe will have user joe’s access rights.

If you need rights in the share to be in effect for different users, then they will each need to map their own external storage in NC using their own credentials.

Thank you for your reply Karl.
That makes sense :slight_smile:

Any idea to solve #2 and #3 ? :

  1. When using Sharing links on external storages : I always get this error message “An unknown error has occurred” (but most of the time, the file is uploaded anyway).
  2. When using Sharing links on external storages : It is impossible to delete files : “Error deleting file “{fileName}”.”

I don’t have these issues when using sharing links on classic shares

I use external storage “local” and can not share a file or directory (same user/rights on nextcloud and local).
I think you must maximize your nextcloud space. Perhaps it is possible to mount the external storage in the nextcloud data.

I think both points do not work like text from KarlF12.

I’m not sure what to say about #2 or #3, but I’m confident on #1. It’s all about user context. When you connect external storage and give NC a username and password, it’s literally logging into the external storage as that user. Any action NC takes on the external storage is therefore done in the context of the login it used.

If I map a SMB share as user joe and give 50 users access to the external storage, the SMB server only sees one thing: user joe logging in and doing stuff.

Yes that make complete sense.
Then I’ll will manage the rights basically by giving access or not to the folders using groups in the external storage management section (and keep my admin user (joe) as the samba logged one).

But if somebody has information about the error messages, that would be great