4

Using latest Ubuntu Server: Ubuntu 20.04.1 LTS I am able to successfully mount a SMB share volume from local Fritz Box router using this command:

mount -t cifs //fritz.box/fritz.nas/wd -o rw,vers=3,username=user,password=password,workgroup=WORKGROUP

The permissions of the mount point:

drwxr-xr-x 2 root    root   

Permissions of a test file copied into the drive after mounting:

-rwxr-xr-x 1 root    root       4 Aug  7 13:05  test.txt

However when I try and view the contents of the file:

test.txt: Stale file handle

Editing also says [Permission Denied]

DMESG output after trying to read the file:

[14540.364844] CIFS VFS: bogus file nlink value 0

I've tried various permissions, users, mount options, and differnent CIFS versions, but all with the same result.

I can't revert back to SMBv1 as the Share does not support it.

The share mounts on other systems (Eg. MacOSX) without issue, and I can read/write.

1 Answer 1

7

Eventually I found this page in German:

https://debianforum.de/forum/viewtopic.php?t=176154

The solution is to add the parameter noserverino:

mount -t cifs //fritz.box/fritz.nas/wd -o rw,noserverino,username=user,password=password,workgroup=WORKGROUP

From man mount.cifs:

Client generates inode numbers itself rather than using the actual ones from the server.

Full mount command in /etc/fstab with a specified user:

//fritz.box/fritz.nas/wd   /home/user/wd    cifs  rw,noserverino,username=user,password=password,uid=user,gid=user,workgroup=WORKGROUP 0 0

Make sure the mount point owner is set:

chown user:user /home/user/wd/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .