File Permissions on External Storage

Nextcloud version (eg, 20.0.5): 21.0.0
Operating system and version (eg, Ubuntu 20.04): Synology DSM 6.2.3
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): 7.4

The issue you are facing:
File permissions are set to 755 after uploading to an external storage so files/folders are read only for users accessing the shares over smb

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Add external (local) storage
  2. Upload file or folder
  3. Try to change file via smb

Hi all,

I face a strange file permission problem with a Nextcloud 21.0.0 installation on a Synology NAS.
On my new NAS the file permissions are set to 755 instead of 777 when I upload or create a file/folder on a local folder mounted as external storage.

I have done this installation some time ago on another NAS and everything works as expected there.

The result is that I can’t edit the files/folders when I connect to the NAS via SMB. On another installation the new files have 777 as permissions and everything works.

As this runs on a synology NAS I can’t change a lot of the internal settings (e.g. umask for apache) and this wasn’t needed on the old installation anyways.

I can’t figure out whats causing this so I wanted to ask if there is a way to force the file permissions to 777 with Nextcloud.

Thank you.

Paul

1 Like

Hello man, hope you are doing well…

Two things:

  1. Your SMB mounted in your OS have the apache’s permission?
    If no, set using: chown -R apache:apache /path/to/your/mounted/smb/dir

  2. If you already did that, check if you have SELINUX enabled, if so, you need to run:
    setsebool -P httpd_use_cifs on

After you try that, let’s try to fix things up.

Good luck man, all the best.

:smiley:

Hi Beltran1337,

thank you for your reply!

I don’t use SMB but mount a local directory on the NAS as external storage in Nextcloud.
The problem is not that nextcloud doesn’t have permission to write to the directory but that the files it creates are not editable by other users.

Best regards,

Paul