Help - Mac/Win - Share one folder to multiple user home folder - aka shortcut folder

Status
Not open for further replies.

Cpluse2

Dabbler
Joined
Feb 21, 2017
Messages
19
Hello,

I need help with something. I tried googling it but maybe I am not explaining it correctly or I don’t know the technical term for it. OK in short I’m trying to share on folder across multiple home folder. I want to add a main Music folder to each user home drive. No matter if there on windows or a mac. They all see the same music folder in their home. In a way have a shortcut to the music folder. I made a mac share and I could see all the shared folders. But not the shared music folder. So I created a CIF Music folder. Windows could see it but I didn’t know how to add it so the mac could see it in the user home folder. It like they had to login into separate account to see the folder. For a while window 7 would not allow me to map the drive because it kept saying my password and user name was incorrect when it would work on the mac.


Well maybe someone can post a link for me to read. What Im trying to do is in every user home folder Mac/Win , I need to share one Music file access every user in their home folder.

My goal is to have every user have their own personal home folder. But I want to them to also have one that they all share from a mac or window computer.

I hope iv explain enough to get help.

Thank you
 
Last edited:

Vito Reiter

Wise in the Ways of Science
Joined
Jan 18, 2017
Messages
232
Ditch CIFS and make an NFS share with the volume/directory you want to use. Go through with permissions (You can use the same user on FreeNAS for both), once NFS service is on and set up properly you can go to the next step. Setting up the above is completely documented and pretty easy to do, shouldn't take but a few minutes.

Next step is to mount the share on your machines, each will have a different method and links I'll provide below. You'll have to enable the Windows feature on the Windows machine "Services for NFS", will depend on Windows version on how to get to that location and on MacOS(X) it should be the terminal command sudo nfs start. Here are the links to some documentation I found on mounting the shares:

MacOSX: Start at "Enable NFS on OS X", as FreeNAS is the NFS server.
Windows: Follow from the start, this one is Windows 7 but if you need a guide on other versions I can find that too, I'm sure.

Official FreeNAS Sharing Doc: Go down to NFS share, that will show you how to set it up, you probably know already, but there it is.

In FreeNAS users config, go to the user that these machines will be logging in with (If root, you'll have to check that box in share settings, but it's unrecommended to log in as root for that), then set that users home directory to the highest parent directory you want them to access, so if there's a folder called 'Media' with 'Music', 'Videos', 'TV', etc. in it, make the home folder media so they can get to all those child folders.

Edit: You should only need to specify the IP for the shares on client machines, FreeNAS will handle the home folder for the user. So, you probably won't need X.X.X.X:/Media/Music, Just X.X.X.X or whatever your local IP for the FreeNAS machine is.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Ditch CIFS and make an NFS share with the volume/directory you want to use. Go through with permissions (You can use the same user on FreeNAS for both), once NFS service is on and set up properly you can go to the next step. Setting up the above is completely documented and pretty easy to do, shouldn't take but a few minutes.

Next step is to mount the share on your machines, each will have a different method and links I'll provide below. You'll have to enable the Windows feature on the Windows machine "Services for NFS", will depend on Windows version on how to get to that location and on MacOS(X) it should be the terminal command sudo nfs start. Here are the links to some documentation I found on mounting the shares:

MacOSX: Start at "Enable NFS on OS X", as FreeNAS is the NFS server.
Windows: Follow from the start, this one is Windows 7 but if you need a guide on other versions I can find that too, I'm sure.

Official FreeNAS Sharing Doc: Go down to NFS share, that will show you how to set it up, you probably know already, but there it is.

In FreeNAS users config, go to the user that these machines will be logging in with (If root, you'll have to check that box in share settings, but it's unrecommended to log in as root for that), then set that users home directory to the highest parent directory you want them to access, so if there's a folder called 'Media' with 'Music', 'Videos', 'TV', etc. in it, make the home folder media so they can get to all those child folders.

Edit: You should only need to specify the IP for the shares on client machines, FreeNAS will handle the home folder for the user. So, you probably won't need X.X.X.X:/Media/Music, Just X.X.X.X or whatever your local IP for the FreeNAS machine is.
what the heck! don't do any of this. nfs is not a good solution if you have a windows client in the mix. And it isn't that great on osx either.

So if I understand you correctly you want each user to have there own directory on FreeNAS to store stuff and inside that directory you want to have them see the same music folder? Or do you just want them to map/mount the music folder directly to their client machine? the second option is simpler. Do you want the users to have read/write or something else? You can just create a guest only share for the music directory and have the clients map that if you want. or you can get fancy with permissions.
 
Last edited by a moderator:

Cpluse2

Dabbler
Joined
Feb 21, 2017
Messages
19
Thank you both for both your advice.

But to make sure you understand my goal. I want each user to have there own directory on FreeNAS to store stuff (and not see each other folders) and inside that same directory I want to have them see the same music folder so I don't have to create separate music directory.

Yes it would be easier to map it as a secondary drive. But cleaner if it was all in one (home) directory for each user.

This one music directory point to one folder on FreeNAS. So when i add more users they will have access to the same folder.

---User 1 home
Pic
Movies
Backup
Work
Music <--- Shared on each user home directory


---User 2 home
User 2 Pic
Uer 2 Movies
User 2Backup
User 2Work
Music <--- Shared on each user home directory
 
Last edited by a moderator:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I think the way you should do this is to setup symlink on FreeNAS to point to the music folder. Each user would get a symlink in their home directory that points to the same music folder.
 
Last edited by a moderator:

Cpluse2

Dabbler
Joined
Feb 21, 2017
Messages
19
I think the way you should do this is to setup symlink on freenas to point to the music folder. Each user would get a symlink in there home directory that points to the same music folder.


Can you give a how to on the best way to do this. If you feel this is better. Vito option sound good also. How is symlink better then NFS share?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Can you give a how to on the best way to do this. If you feel this is better. Vito option sound good also. How is symlink better then NFS share?
Huh? Symlinks and nfs are not even related. That guy talking about NFS was just spewings nonsense.

If setting this up is over your head I suggest reading up on permissions and symlinks first. A how to will not help with this type of problem.

Sent from my Nexus 5X using Tapatalk
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
How to use symlinks properly depends on how your file tree & shares is set up. Samba by default won't allow you to follow a symlink outside of a share. You'll need to enable "widelinks" to have samba link to places outside of the share. However, you can do the following without any changes
Share example
Code:
[USER HOMES]
path="/mnt/Tank/UserHomes"

User 1 path = /mnt/Tank/UserHomes/User1
User 2 path = /mnt/Tank/UserHomes/User2
Music Folder path = /mnt/Tank/UserHomes/Music

ln -s /mnt/Tank/UserHomes/Music/ /mnt/Tank/UserHomes/User1/Music
ln -s /mnt/Tank/UserHomes/Music/ /mnt/Tank/UserHomes/User2/Music

DONE!

Once you do this, you'll have a share FREENAS\UserHomes, and inside the share, you'll have the following paths
\\FREENAS\UserHomes\User1\Music
\\FREENAS\UserHomes\User2\Music
\\FREENAS\UserHomes\Music

And both User "music folders" will be symlinks to "\\FREENAS\UserHomes\Music".

I have noticed that this sort of file tree can slow down searches through Windows Explorere if you get a bit excessive with the number of symlinks.
 

Cpluse2

Dabbler
Joined
Feb 21, 2017
Messages
19
How to use symlinks properly depends on how your file tree & shares is set up. Samba by default won't allow you to follow a symlink outside of a share. You'll need to enable "widelinks" to have samba link to places outside of the share. However, you can do the following without any changes
Share example
Code:
[USER HOMES]
path="/mnt/Tank/UserHomes"

User 1 path = /mnt/Tank/UserHomes/User1
User 2 path = /mnt/Tank/UserHomes/User2
Music Folder path = /mnt/Tank/UserHomes/Music

ln -s /mnt/Tank/UserHomes/Music/ /mnt/Tank/UserHomes/User1/Music
ln -s /mnt/Tank/UserHomes/Music/ /mnt/Tank/UserHomes/User2/Music

DONE!

Once you do this, you'll have a share FREENAS\UserHomes, and inside the share, you'll have the following paths
\\FREENAS\UserHomes\User1\Music
\\FREENAS\UserHomes\User2\Music
\\FREENAS\UserHomes\Music

And both User "music folders" will be symlinks to "\\FREENAS\UserHomes\Music".

I have noticed that this sort of file tree can slow down searches through Windows Explorere if you get a bit excessive with the number of symlinks.

Good morning FREENAS group.

Anodos thank you for the great explanation. I going to try it when I get home later today. But it seem like it what I was looking for. I know I have allot more to learn. But it looking good. At the same time trying to learn about permission im trying to learn how to protect the data inside and out. Just built a pfSense box. So allot to learn. Thank you again and I be to update you on how it went.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Good morning FREENAS group.

Anodos thank you for the great explanation. I going to try it when I get home later today. But it seem like it what I was looking for. I know I have allot more to learn. But it looking good. At the same time trying to learn about permission im trying to learn how to protect the data inside and out. Just built a pfSense box. So allot to learn. Thank you again and I be to update you on how it went.

To clarify: in my above example, "/mnt/Tank/UserHomes/User1/Music" should not exist prior to running the ln command.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Now i see what people mentions how there trolls on here
It was not a troll response.

if you need help. yes your right i do need to read up on learning more about permission and FreeNAS. But it won’t happen if there more people like you on here. I did this easily on my Synology 5 bay drive. Until I learn about how NFS drive are better protecting data. At time like these i wish there was a way to block people from posting on personal created post but not from the entire forum.
This is an overreaction. If you have to use windows, SMB (formerly called CIFS) is usually a better option.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
anodos,

Thanks again for all the advice!!!

One more detail that you may not have picked up on. When a directory is configured as a "home share", samba in FreeNAS will do two things (if I remember correctly)
  1. Create a hidden \\SERVER\homes share [this will point to /mnt/Tank/UserShare]
  2. Dynamically create a \\SERVER\{username} share based on the user who has connected to the server. [this will point to /mnt/Tank/UserShare/{username}]
You will not be able to access the "Music" folder in situation (2) unless you enable "wide links" because the symlink will point outside of the share's path.
 

Cpluse2

Dabbler
Joined
Feb 21, 2017
Messages
19
One more detail that you may not have picked up on. When a directory is configured as a "home share", samba in FreeNAS will do two things (if I remember correctly)
  1. Create a hidden \\SERVER\homes share [this will point to /mnt/Tank/UserShare]
  2. Dynamically create a \\SERVER\{username} share based on the user who has connected to the server. [this will point to /mnt/Tank/UserShare/{username}]
You will not be able to access the "Music" folder in situation (2) unless you enable "wide links" because the symlink will point outside of the share's path.


How’s it going anodos.

Sorry for the late reply. I was banned from the site on Friday. Almost had a weekend of being in limbo. A MOD message me in my PM trying to flex his or her power. I guess the MODs here like to jump on you when you stand up to their favorites. But reading other post I can see that just SweetnLow nature and the Mods let him get away with it. I guess in these times people feeling get hurt easy and they will block you from a site. Even when the conversation is in a private message box. I didn’t even curse. LOL Only reason I came back on was I wanted to say thank you for assisting me, you too Vito Reiter. I decided to go another route. So happy this happen thou. FreeNas is not able to keep up with what I need and after seeing what happen with Corral I rather go with a more reliable product features. And a community that willing to help and not put you down because you are new. Except you both and many others on here. From doing a search allot of people feel this way. Well for me it was the Mods. You can’t even erase your own account on here. To funny. Well im off and good luck to others who trying to learn freenas. Trust me there choices out there. Not trying to get in a war. Just speaking my own personal story. Mods I know you will erase my account, to hide allot of the truth that goes on here.

Cya
 

JoshDW19

Community Hall of Fame
Joined
May 16, 2016
Messages
1,077
How’s it going anodos.

Sorry for the late reply. I was banned from the site on Friday. Almost had a weekend of being in limbo. A MOD message me in my PM trying to flex his or her power. I guess the MODs here like to jump on you when you stand up to their favorites. But reading other post I can see that just SweetnLow nature and the Mods let him get away with it. I guess in these times people feeling get hurt easy and they will block you from a site. Even when the conversation is in a private message box. I didn’t even curse. LOL Only reason I came back on was I wanted to say thank you for assisting me, you too Vito Reiter. I decided to go another route. So happy this happen thou. FreeNas is not able to keep up with what I need and after seeing what happen with Corral I rather go with a more reliable product features. And a community that willing to help and not put you down because you are new. Except you both and many others on here. From doing a search allot of people feel this way. Well for me it was the Mods. You can’t even erase your own account on here. To funny. Well im off and good luck to others who trying to learn freenas. Trust me there choices out there. Not trying to get in a war. Just speaking my own personal story. Mods I know you will erase my account, to hide allot of the truth that goes on here.

Cya

Well since you decided that you wanted this to be public I will also make my response public. You were politely asked to stop arguing with other users in a private message from me. After receiving multiple messages from you that violated our forums rules and TOS, you did receive a temporary suspension from the forums. Apparently, that concept did not sink in as you are back on the forums trying to pick a fight with anyone that will bite. You are welcome to be a part of this community as long as you can follow the rules, however, If this trolling behavior continues, we will have no choice but to remove you from the community. The ball is in your court. Play by the rules and you are welcome to stay. If not, then please move on and let the people that would like to discuss FreeNAS have our discussion.

Thank you,

Josh
 
Joined
Dec 2, 2015
Messages
730
The profile picture with fingers in ears is very apropos. :)
 
Status
Not open for further replies.
Top