Score:1

CIFS samba mount works from manual but not from fstab

cn flag

hi I have a strange problem that I have been trying to troubleshoot. In Ubuntu 20.04.2 LTS I am trying to mount a samba share (NTFS usb drive attached to router) using cifs. I can do this manually:

sudo mount -t cifs -o username=admin //192.168.1.1/FritzBoxNAS/New_Volume /mnt/sambaHD/

and everything works well. I can go to /mnt/sambaHD and (sudo) create new folders, delete files/folder and all is good.

However, when I try to do the same from /etc/fstab, I can mount the share just fine (at any uid, gid, file_mode and dir_mode I wish) and go to /mnt/sambaHD and view thes files but thats it. I cannot create, delete files or folders (sudo or not). In fact when I try to create, for example, a folder I get:

lattepanda@lattepanda:/mnt/sambaHD$ sudo mkdir test
mkdir: cannot create directory ‘test’: No such file or directory

which is really weird. I have tried a lot of variations of the automount in fstab but nothing changes. My latest variation is:

//192.168.1.1/FritzBoxNAS/New_Volume/   /mnt/sambaHD cifs vers=3.0,credentials=/home/lattepanda/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=1000,gid=1001,nofail 0 0

Can you please help? This is just too strange to figure out.

Thanks

vzografos avatar
cn flag
I have a feeling that the router where the usb drive is attached has a bad SMB implementation
in flag
Are you sure the implementation is `vers=3.0`? Unless you’ve experienced really sluggish write performance, it’s generally best to leave that blank so the initial handshake between the systems can work out which version they’ll use to communicate
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.