I am trying to mount two subdirectories from the same share name but cannot get it to work.

# Mount the two different subfolders:
# $server and $share are the same - the subfolder differs:
$ subfolderA=a/b/c
$ subfolderB=x/y/z
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB

# Traverse the directories - I see the same file in both directories (should only be be in dirA)
$ find /mnt/dir[AB] -name fda.txt -ls
707409139 1024 -rwxr-xr-x   1 root     root           15 May 28 08:50 /mnt/dirA/fda.txt
707409139 1024 -rwxr-xr-x   1 root     root           15 May 28 08:50 /mnt/dirB/fda.txt

# Mount in opposite order:
$ umount /mnt/dirA
$ umount /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA

# Traverse the directories - I do not see the file fda.txt at all
$ find /mnt/dir[AB] -name fda.txt -ls

I have verified my access to the different subfolders using smbclient and it gives me the expected results.

The reason for having two separate mounts instead of just one, is because I do not have access to the share itself, but only to the subfolders.

  • To understand the problem try to mount with --verbose option, i.e.: mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose
    – Bob
    Commented Aug 15, 2018 at 7:41
  • "cannot get it to work" please describe in detail what does work and in what way it doesn't work. Error messages? Outright silent failure? Permissions? Does one work but not the other? Error messages on the server? Commented Mar 26, 2021 at 19:30

1 Answer 1


To understand the problem deeply, try to mount with --verbose option, i.e.

mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose

The possible reasons of the problem can be wrong inode numbers or caching. As workaround for the inode numbers problem try this options (one of them):


Also try different caching methods (one of them):


Read mount.cifs(8) additionally.

  • Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=,unc=\\\share,user=username,prefixpath=a/b/c,pass=******** ip=,unc=\\\share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=,unc=\\\share,user=username,prefixpath=x/y/z,pass=** ip=,unc=\\\share,user=username,prefixpath=a/b/c,pass=**
    – S.Olesen
    Commented Aug 15, 2018 at 8:16

You must log in to answer this question.

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