Can I prevent people to save in home folder? And force mount smb shares?

Hi,
I have some SMB shares that I have as External Storage to my Nextcloud users and I don’t want them to save there files in the home / main folder is it possible to prevent them to do that?
I want them to save everything inside there SMB folders that I have mounted trough External Storage.

Also, I have every users synced from my Active Directory server over ldap and I would love if it was possible for them to auto-mount there Home folder (H: in windows) it’s shared over the network.

Hey, you need yo mount the SMB storage in Linux.

Put something like this in your /etc/fstab:

//172.30.100.6/path-to-smb-share /mnt/smb cifs file_mode=0770,dir_mode=0770,uid=www-data,gid=www-data,credentials=/home/.smbcredentials,iocharset=utf8 0 0

Remember that you have to create /home/.smbcredentials and set the permissions to 600 in Linux.

You also have to manually create /mnt/smb and point to that dir when the SMB mount is successfully mounted.

Good luck! :slight_smile: