Can't get permissions right when data dir is mounted



I am mounting the ownCloud data directory with this (mounts a WD EX2):

// /owncloud cifs credentials=/home/server/auth/.smbcredowncloud,rw,uid=33,gid=33,iocharset=utf8,file_mode=0770,dir_mode=0770,sec=ntlm 0 0

These are the directory perms:

drwxrwx--- 2 www-data www-data 0 Oct 3 03:48 owncloud/

On the installation it can't continue due to lack of permissions and if I mount the dir after installation then the files that are not www-data are removed and the .ocdata not found message appears.

Is that fstab line correct for ownCloud?



whe have a FAQ thread available here providing most background info on this topic:

If the fstab line is correct is something you need to find out based on that info as this can differ on every environment


Got it.

Fixed with:

// /home/server/mounts/owncloud cifs credentials=/home/home/server/auth/.smbcredowncloud,permissions,users,uid=33,gid=33,iocharset=utf8,umask=000,sec=ntlm 0 0

And both the data and the previous directory need to be www-data:www-data.


Nice, thanks for posting that. I have added that line as an example to the mentioned FAQ.


Actually that like was not working. I thought it was mounting but it was actually returning errors.

This one is working, please update FAQ if you added the other line:

// /home/server/mounts/owncloud cifs credentials=/home/server/auth/.smbcredowncloud,rw,uid=33,gid=33,dir_mode=0770,iocharset=utf8,sec=ntlm 0 0


Thanks for the follow-up, have updated the FAQ accordingly.