/Data directory as an cifs share

Is it possible to have my /Data folder mounted on a cifs share?
My cifs share is mounted under /media/nextcloud and thats the directory i pointed it to in config.php

First i created the folder /media/nextcloud and gave the ownership to www-data
in fstab i put this line:
//192.168.117.211/home /media/nextcloud cifs nosuid,nodev,noexec,credentials=/home/sysop/.smbcredentials,file_mode=0777,dir_mode=0777 0 0

ls -la /media/nextcloud show this:
drwxrwx— 2 www-data www-data 4096 Oct 13 14:58 .
drwxr-xr-x 3 root root 4096 Oct 13 14:56 …
drwxrwx— 2 www-data www-data 0 Oct 13 14:58 data
drwxrwx— 2 www-data www-data 0 Oct 13 14:42 fredag
-rwxr-xr-x 1 www-data www-data 0 Oct 13 14:54 info.txt
drwxrwx— 2 www-data www-data 0 Oct 13 14:42 test
drwxrwx— 2 www-data www-data 0 Oct 13 14:58 test2

I can sudo -u www-data touch /media/nextcloud/info.txt and the file gets created as you can see above.

But in the installation process of nextcloud it tells me i cant continue the installation because i have no read or write permission to /media/nextcloud/

Edit: I have tried every single command i have been able to find on google this past weekend with no success.
There must be someone in this forum with previous experience in this issue who can share his solution, please!

I’ve never used a cifs mounted filesystem as data directory, but I would try removing the “noexec” clause.

I would also post the nextcloud,log file: perhaps you’re overlooking something that someone can spot… :wink:

1 Like

That line is obsolet, I use this in my fstab right now:

//192.168.117.211/home /media/nextcloud/data cifs credentials=/home/sysop/.smbcredentials,uid=33,gid=33,dir_mode=0770,file_mode=0770,iocharset=utf8,sec=ntlm, 0 0

And thank you so much for pointing this out, “I would also post the nextcloud,log file: perhaps you’re overlooking something that someone can spot…”

Because in the log it clearly said “/media/nextcloud/data” is outside my specified base_dir.
So by adding it to my base_dir the installation went smooth like it should.
Cheers!

May not be of any use but I had an older installation running on my Raspberry Pi that used my Synology NAS for the data directory.

I got mine to work by setting up NFS on the Synology and symlinking the folder on the Pi to it through my fstab.

When I set it up it was www-data:www-date and 777 then changed to 755 (or 744, cant remember exactly) once I checked it was working.

Maybe it’s if help