Using SAMBA share as data folder

Hi all,

I’m setting up Nextcloud AIO and want to have the data folder on my samba share.
I tried using NFS and it worked like a charm (the problem is that my Synology NAS cannot use NFS for an encrypted share, only samba).

I have entered a location for the data folder in the docker-compose file (from AIO page).
and previously I mounted using NFS on that location.

Now, when I mount using SAMBA, it is not possible to delete files, only create.
(It is possible to delete files in user folder, but not under Group folders, only create).

This is the mount information from fstab:
//192.168.x.x/nextcloud/data /data cifs credentials=/etc/win-credentials,uid=33,gid=33,dir_mode=0770,file_mode=0770,vers=2.0 0 0

On the NAS, the user in the credential file above owns everything,
but I mount as uid/gid 33 for NC to be happy.
All created files with NC is owned by the user in credentials file when checking on the NAS…

Nextcloud starts happily and everything works, except deleting files.
Any ideas?


Perhaps it has something to do with group folder settings?

I tried to remove “advanced permissions” but no effect.

The thing is that everything worked as is with NFS, but as soon as I switched to SAMBA the issue with group folders started…

Try to use

//192.168.x.x/nextcloud/data  /data  cifs  rw,mfsymlinks,seal,credentials=<your-credentials-file>,uid=33,gid=0,file_mode=0770,dir_mode=0770  0  0

as described here: GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All-in-One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

I only got my knowledge from the forum here. However, it’s always a good idea to stick to the project’s manual :wink:

1 Like

What, precisely, shows up in your Nextcloud log when you try to delete files?

There’s no need to guess at the cause. There should already be clues if it’s failing. :slight_smile:

Thanks for the replies!

Worked much better using the options from the manual :slight_smile:

There also was an issue with me migrating the files from one share to another, causing the file/folder permissions/owner to change.