0

I have two samba shares on a remote server (Debian 10, stable) on my home network. On my laptop (Debian 10 stable), I would like to automatically mount these shares to my local filesystem tree. To this end, I added these lines to my fstab file:

//cherver/sambaDocs /home/maquinisto/sambaDocs  cifs    credentials=/home/maquinisto/.smbcreds,user,rw  0 0
//cherver/sambaEtc  /home/maquinisto/sambaEtc   cifs    credentials=/home/maquinisto/.smbcreds,user,rw  0 0

My problem is that when fstab is read at boot or with sudo mount -a, the mount points change ownership to root, and I cannot write files there as a normal user. How do I mount these shares to my laptop system without the mount points changing owner to root?

0

mount.cifs allows the options uid and gid to specify the user, who "owns" the file system.

In you case the options (credentials=/home/maquinisto/.smbcreds,user,rw) would need to be extended to include uid=xxxx and if you so wish gid=yyyy

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.