Linux – Unmount/unbind a filesystem? Can I just use `rm`

filesystemslinuxunmounting

I used this to give a chrooted ftp user access to another area of the filesystem:

mount --bind /var/www/dev/ /home/ftp_user/www_dev

per this website here.

And, oops, I realized I gave the ftp user access to too many files.

How do I fix that? rmdir doesn't work:

rmdir: failed to remove `www_dev': Device or resource busy

And if it did, I'm afraid it would remove the mounted files.

Best Answer

try umount -l /home/ftp_user/www_dev.

this will detach the file system immediately, and clean up any leftover references when it's no longer busy.

source: http://linux.die.net/man/8/umount

Related Question