SOLVED bind command?

Status
Not open for further replies.

scott omen

Dabbler
Joined
May 31, 2016
Messages
10
I'm on 9.10.1. I'm looking to bind a folder into a home directory. I've tried all the ones I could find online. mount -o bind ln-s --bind and a couple others, what bind command can i use? or where is the fstab hard file so I can edit it?
 
Last edited by a moderator:

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
bind a folder? You really should NOT be messing with the core of FreeNAS.
 

scott omen

Dabbler
Joined
May 31, 2016
Messages
10
bind a folder? You really should NOT be messing with the core of FreeNAS.

yes bind. what does is connect 2 different folder together, like a mnt drive folder to a home directory, so the folder in the home directory acts and has all the files of the mnt drive folder.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
From the onset, this sounds like a bad idea, but I don't know what exactly you're trying to accomplish. Maybe there is a better way?
 
Joined
Feb 2, 2016
Messages
574
I think you're looking for...
Code:
ln -s  /path/to/source   /path/to/target

That creates a symbolic link from one file or directory to another. That may or may not do what you want. Depending on how Samba is configured, it may not follow symlinks and, even if it does, it may not follow symlinks across filesystems.

(As for why one might want to do that, let's say you have a group of read-only forms that you want everyone to have. You can symlink that directory of forms into every user's home directory. A better way *might* be to create a share just for forms. But not necessarily.)

Cheers,
Matt
 

scott omen

Dabbler
Joined
May 31, 2016
Messages
10
From the onset, this sounds like a bad idea, but I don't know what exactly you're trying to accomplish. Maybe there is a better way?

ok i have 6 drives, each with there own volumes and folders i want to share over mutli user ftp. i want the users to have read-only to those 6 folder and nothing "above" them.

I think you're looking for...
Code:
ln -s  /path/to/source   /path/to/target

tryed that didnt work over ftp. the folder showed up as an exe for some reason?
 

scott omen

Dabbler
Joined
May 31, 2016
Messages
10
while im at work, ive been doing some out of box thinking. what if i were to make a Pre Init script command to add those 6 lines " /path/of/source/ /path/to/target none bind" to the fstab file, before the system fully boots?
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
ok i have 6 drives, each with there own volumes and folders i want to share over mutli user ftp. i want the users to have read-only to those 6 folder and nothing "above" them.
Why not take those 6 drives, make a real Pool/Volume (say RaidZ2?) then have one DataSet. Make the desired folders and set the desired permissions?

Did I miss anything in my assumptions?
 

scott omen

Dabbler
Joined
May 31, 2016
Messages
10
Why not take those 6 drives, make a real Pool/Volume (say RaidZ2?) then have one DataSet. Make the desired folders and set the desired permissions?

Did I miss anything in my assumptions?

no, if one of the drives failed then i would have to go through the whole server to see which files i lost. as of now if i lose the movies drive, ill know i lost all my movies. plus its to late to change over to 1 pool. and there are some folder in said drive i dont want my user to see.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
no, if one of the drives failed then i would have to go through the whole server to see which files i lost.
I think the redundancy aspect of FreeNAS has been lost on you. I will leave you to your own devices and wish you the best of luck.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Symlinks should work across datasets and it should work across pools also since it's path based. You don't make the symlinks over ftp, you need to be using a shell on the freenas system via ssh to make that symlink work. Then you might have to flip some settings to get ftp to use them correctly.

I'm just playing along because this might work. But really this is stupid and no one should do what this guy is doing. Just make your drives into a pool and call it good.
 

scott omen

Dabbler
Joined
May 31, 2016
Messages
10
Symlinks should work across datasets and it should work across pools also since it's path based. You don't make the symlinks over ftp, you need to be using a shell on the freenas system via ssh to make that symlink work. Then you might have to flip some settings to get ftp to use them correctly.

I'm just playing along because this might work. But really this is stupid and no one should do what this guy is doing. Just make your drives into a pool and call it good.
Stop making sense!
I think the redundancy aspect of FreeNAS has been lost on you. I will leave you to your own devices and wish you the best of luck.

if i wanted you'lls advice on how to build my own server i would have asked before i built it. thanks for not helping!
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
if i wanted you'lls advice on how to build my own server i would have asked before i built it. thanks for not helping!
So you prefer to ask our advice on how to do something halfassed and improper. Got it. Thanks for clarifying your stance.
 

scott omen

Dabbler
Joined
May 31, 2016
Messages
10
figured it out. in the task tab, make a Post Init script command "mount_nullfs /path/of/source/ /path/to/target"
 
Status
Not open for further replies.
Top