I have linux user lUser
(uid=123) that is in the group lGroup
(guid=145). I have windows user wUser
that has full access to the share. I want to automount that share on linux machine and give lUser
full access to that directory. I've edited /etc/fstab
:
//192.168.1.2/WinShare /home/root/WinShare cifs username=wUser,password=Password,iocharset=utf8,sec=ntlm,uid=123,gid=145 0 0
I am doing sudo mount -a
and this folder is still owned by root.
Then I created users on both machines with the same name and password. After that I added following line to the fstab
//192.168.1.2/WinShare /home/user/WinShare cifs iocharset=utf8,sec=ntlm,uid=1000,gid=1000 0 0
It is still mounted as root
I've also tried to do:
//192.168.1.2/WinShare /home/user/WinShare ntfs-3g users,permissions,auto 0 0
still the same ...