Edit /etc/fstab
and add the following:
//network/path /mnt/share-letter cifs rw,relatime,vers=2.0,cache=strict,uid=1000,noforceuid,gid=1000,noforcegid,addr=192.168.1.110,file_mode=0755,dir_mode=0755,soft,nounix,mapposix,echo_interval=60,actimeo=1,closetimeo=1,user=myuser
Run $ mount /mnt/share-letter
Important parts:
uid = 1000
gid = 1000
This sets the windows user to the default user
vers=2.0
user=myuser [the user for the shared drive]
If there is any space in the server path, you need to replace it by \040
, for example://servername/My\040Documents
Refs:
https://serverfault.com/questions/433274/why-cant-you-mount-a-windows-share-in-linux-and-make-it-writable
https://ubuntu.com/server/docs/how-to-mount-cifs-shares-permanently
https://www.howtogeek.com/414634/how-to-mount-and-unmount-storage-devices-from-the-linux-terminal/
https://unix.stackexchange.com/questions/356723/cifs-vfs-cifs-mount-failed-w-return-code-95
https://superuser.com/questions/1128634/how-to-access-mounted-network-drive-on-windows-linux-subsystem
- Log in to post comments