Correct way to mount SMB network shared drive?

Hi all,

I’m trying to get Nextcloud setup in an Ubuntu VM (Virtualbox).

My intent is for Nextcloud to use a shared network drive for storing all user data. The shared drive is an NTFS drive in Windows 10. I’ve mounted the drive using this line in /etc/fstab:

// /media/u cifs credentials=/home/kevin/.smbcredentials,uid=33,gid=33,vers=3.0,nounix 0 0

The drive mounts ok in Ubuntu, and I can read/write without a problem via the command line. However, Nextcloud keeps telling me that " Your data directory is readable by other users. Please change the permissions to 0770 so that the directory cannot be listed by other users."

But when I do a chmod to the relevant folder, nothing happens to the permissions - presumably because the folder is “owned” by Windows.

Is there an alternative method of mounting Windows drives that lets me have better control of things like permissions?

Thanks in advance.


Turns out that if I was to refer to the manual I’d get the answer. Who’d have thunk it!?

dir_mode=0770,file_mode=0770 were the pertinent options I needed

1 Like