I have been given an account on a Windows file server. The (to me) very strange situation is that
- I can connect with
smbclient
, change to the (deep) subdirectory or show its content - I can mount the share (no error message; mount point is in
/proc/mounts
) but I cannot change to the same path or list its contents. I getNo such file or directory
.
I have neither "display content" nor "change into" permission for the lower level subdirectories. That should not be a problem and it is not for smbclient
.
The Windows admin has given my user additional permissions so that I can now see contents of the moint point. And now I can reach the deeper level subdirectories via the mount, too.
We have not determined yet what the minimal set of Windows permissions is which we need for this to work in the current configuration. However, the problem must be on the Linux side anyway.
- What are the differences between the ways how
smbclient
andmount.cifs
access a Windows share? - How can
mount.cifs
be made to behave likesmbclient
?
conclusion
I had the Windows admin reset the permissions of the share so that I could test the suggestions in the answers. Unfortunately the problem disappeared. As before I cannot see the contents of the share but now the mount can access the deep subdirectories. Very strange.
A remark @intika: I was going to make an additional bounty for your answer but while I was doing so you for some reason deleted your answer...
responses to comments and answers
Windows server
Server 2016, SMB 3.1.1
Samba version
4.5.16; not a member of the domain
commands used
/etc/fstab
://fs-p01.dnsdomain/Data /data cifs credentials=/root/fs-p01.credentials 0 0
smbclient //fs-p01.dnsdomain/Data -U username -W windowsdomain
I just realize that windowsdomain
in the smbclient
command was incomplete. Probably not relevant as this works. It was just name
instead of name.local
. However, that is a difference in the configuration between the commands. Unfortunately I cannot check whether mount
would work if I use the wrong domain with it as I cannot change the permissions on the Windows server back to their original settings. I have to wait for the Windows admins to do that on Monday.
paths
The path length within the share is 85 characters for the directory I want to work in. I should be able to access its parent, too, i.e. even less:
xxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/2020/2020_06
config files
/root/fs-p01.credentials
username=username
password=...
domain=name.local
/etc/smb/smb.conf
(probably not relevant for client functions)
[global]
workgroup = MERCHANTINVOICE
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
# panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
encrypt passwords = yes
unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = no
map to guest = bad user
usershare allow guests = no
dmesg
output for any possible errors reported by the kernel after mounting? It would help to have more information on the mount flags used vs the smbclient setup. Especially any *id and credential options, since you seems to have permission issues.