How to set Linux file permissions for files uploaded via external storage

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04 with docker

I need some help configuring an external storage. I have a samba share that I share with my family so that everyone can access the same folder. I also want to access it via nextcloud so I configured it as an external SFTP storage (because smbclient is not available in the docker container). The problem now is that files uploaded by one user have permission (like the actual file permissions on the harddrive) that make it read only for other users.

Is there a way to set default file permissions for files uploaded via the external storage app? In my case I would like to set the permissions to 775 and change the group to “family”.

Cheers and thanks for the help

I would recommend you don’t use SMB and external storage but fully switch to Nextcloud utilizing integrated permissions management - shares and groupfolders-app are much more powerful and fully integrated.

you’re not using the snap, that’s clear… but the procedure is similar here:

so with a bit of fiddling you might get it right :nerd_face:

basically you want to mount the samba directory into the host file system with the correct permissions…