NFS and SMB, Neither work well!

sudo mount -t cifs //192.168.1.106/Movies /mnt -o ro,vers=3.0,credentials=/home/osmc/.smbcredentials
osmc@osmc:~$ sudo ls -l /mnt
ls: reading directory ‘/mnt’: Permission denied
total 0

Nothing.

Something new! I added OSMC to my share instead of just everyone and tried to mount again, now I get this:
sudo mount -t cifs //192.168.1.106/Movies /mnt -o ro,vers=3.0,credentials=/home/osmc/.smbcredentials
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

It’s a permissions problem on the server then. Just for fun, unmount (sudo umount /mnt) and try this:

mount -t cifs //192.168.1.106/Movies /mnt -o ro,vers=1.0,credentials=/home/osmc/.smbcredentials

Something new! I added OSMC to my share instead of just everyone and tried to mount again, now I get this:
sudo mount -t cifs //192.168.1.106/Movies /mnt -o ro,vers=3.0,credentials=/home/osmc/.smbcredentials
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I’ll try that too

That’s because you didn’t

sudo umount /mnt 

before mounting again.

after a umount /mnt

sudo mount -t cifs //192.168.1.106/Movies /mnt -o ro,vers=1.0,credentials=/home/osmc/.smbcredentials
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

SMB 1 is turned off then, so go back to using vers=3.0

sudo mount -t cifs //192.168.1.106/Movies /mnt -o ro,vers=3.0,credentials=/home/osmc/.smbcredentials
osmc@osmc:~$ sudo ls -l /mnt
ls: reading directory ‘/mnt’: Permission denied
total 0

:frowning:

What does

ls -ld /mnt

show?

 ls -ld /mnt
drwxr-xr-x 2 root root 12288 Mar  5 18:12 /mnt

You need to check the permissions on the files on the server. Not the share but the actual files.

Let us go back one step back and try smbclient again.

smbclient -m SMB3 -U osmc \\192.168.1.106\Movies

After you enter the password you should get a prompt where you can type ls

Server as in my hosting PC (Windows)? If I check that it just says shared and with OSMC. If I go to \192.168.1.106 in file explorer (on my host itself) I get all directories shared shown.

Gives me this error
smbclient -m SMB3 -U osmc \192.168.1.106\Movies
WARNING: The “syslog” option is deprecated

\192.168.1.106Movies: Not enough '\' characters in service
Usage: smbclient [-?EgBVNkPeC] [-?|--help] [--usage]
        [-R|--name-resolve=NAME-RESOLVE-ORDER] [-M|--message=HOST]
        [-I|--ip-address=IP] [-E|--stderr] [-L|--list=HOST]
        [-m|--max-protocol=LEVEL] [-T|--tar=<c|x>IXFqgbNan]
        [-D|--directory=DIR] [-c|--command=STRING] [-b|--send-buffer=BYTES]
        [-t|--timeout=SECONDS] [-p|--port=PORT] [-g|--grepable]
        [-B|--browse] [-d|--debuglevel=DEBUGLEVEL]
        [-s|--configfile=CONFIGFILE] [-l|--log-basename=LOGFILEBASE]
        [-V|--version] [--option=name=value]
        [-O|--socket-options=SOCKETOPTIONS] [-n|--netbiosname=NETBIOSNAME]
        [-W|--workgroup=WORKGROUP] [-i|--scope=SCOPE] [-U|--user=USERNAME]
        [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file=FILE]
        [-S|--signing=on|off|required] [-P|--machine-pass] [-e|--encrypt]
        [-C|--use-ccache] [--pw-nt-hash] service <password>

Hi

looks like \\ may need escaping, please try:

smbclient -m SMB3 -U osmc \\\\192.168.1.106\Movies

Thanks Tom.

@MarchHare
Yeah or smbclient -m SMB3 -U osmc '\\192.168.1.106\Movies' just tried that loccally that works

1 Like

That gives me

smbclient -m SMB3 -U osmc '\\192.168.1.106\Movies'
WARNING: The "syslog" option is deprecated
Enter osmc's password:
Domain=[DESKTOP] OS=[] Server=[]
smb: \>

no errors

Than ls?

smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*

:frowning:

OK then we at least have another confirmation that it is a permission issue on your Win10 Machine. Check again if you gave the user osmc full rights on Movies and you ticked to apply recursive to folders.

full rights? It only needs read only right? I never want to delete anything through the network.

When I see the “choose people to share with” window I see Everyone “Read”, Desktop “Owner” and OSMC “Read”.

Well you need “read” and “List Folder contents” as a minimum and that recursive.