mount --bind

Status
Not open for further replies.

raymondcidad

Dabbler
Joined
Oct 17, 2011
Messages
20
Hi guys
trying to create a symbolik link accesible through FTP, I'm using the mount --bind command:

Code:
mount --bind olddir newdir  


But freenas says that's a iligal option. Like there is no --bind option.

Freenas has problems with --bind? or maybe is other thing Im doing wrong?

thanks
 

raymondcidad

Dabbler
Joined
Oct 17, 2011
Messages
20
Ok, I got the answer myself, so Im posting here for the community.

Freebsd doesnt support mount --bind, but it does have that option into another command

Code:
mount_nullfs targetdir newdir


Does the same. With that, you'll be able to access targetdir from newdir.

If you ever need to remove newdir, you will have to do a "umount newdir" first. Not even root will be able to remove it without umount it first.

PD: All that was looking for a solution of symbolic links and FTP users (since FTP users cannot view symbolic links). The solution works great. Tested in all ftp clients.

cheers.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
"mount --bind" looks like some sort of Linux-ism. nullfs is a 4.4BSD'ism so it's been around for about twenty years, kind of wish Linux didn't feel the need to reinvent the wheel so often.
 
Status
Not open for further replies.
Top