[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using bind mount



I am trying to get around the restriction of symlinks not resolving in
FTP when the account is DefaultRoot'ed and CHRoot'ed. I mounted a NAS
volume, some directories of which I want to appear as being rooted
elsewhere, thus:

# mkdir -p /mnt/nas
# mount.cifs //ds1/vol1 /mnt/nas -o [various options]

When I 'ls -l /mnt/nas', I see all the directories at the top level of
//ds1/vol1. Fine.

Now, according to everything I've read about bind mount, I should be
able to:

# mount -o bind /mnt/nas/doc /home/steve/doc

where `doc' is a directory on /mnt/nas as described above, and
`/home/steve/doc' is where I want it to appear in my own directory
structure. Therefore, if I FTP into the steve account, while I cannot
escape up the tree past /home/steve, the path /home/steve/doc should
have been able to be created, and I should be able to access it in the
normal FTP way. However, the above mount with bind command yields:

mount special device /mnt/nas/doc does not exist

While that path exist but isn't a special device, the documentation
(mount manpages and
http://backdrift.org/how-to-use-bind-mounts-in-linux) says this should
work. What am I missing about mount with the bind option?


Reply to: