Share folder with CIFS and NFS

Status
Not open for further replies.

ThePhantom0114

Dabbler
Joined
Oct 3, 2013
Messages
12
Hey everyone, so I'm slowly getting the hang of FreeNAS now, its taken me some time but I'm really liking it. I am actually going to rebuilt my setup today because I made a few mistakes the first time around as a brand new user and now I am going to try and fix them.

My question is this though, I plan on having 2 datasets, one for media that will be open to everyone, and one for me, which will be private. Both datasets need to be accessible by my linux server (NFS) and by several Windows clients (CIFS). Is there anyway I can share these datasets and use the linux permissions (other users will be able to log in to the linux server) and connect with windows as one of linux users to get the permission set in linux?

For example, my private folder, if I share it and connect in linux, I can set it to 700, and no one else can access it, but the problem is I can't access it in Windows anymore either, because the Windows user only gets the "other" rights, which means I have to have it fully open and I don't want that.

Is there anyway to set up a NFS and CIFS share, and be able to lock it down like that? Any help would be appreciated, thanks!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Just as a warning, sharing the same files with CIFS and NFS is crazy dangerous. Just don't do it if you value your data. There's no reason why your Linux server can't use CIFS.
 

ThePhantom0114

Dabbler
Joined
Oct 3, 2013
Messages
12
Ok...I thought performance was better for NFS? The linux server will be doing most of the writes to the NAS, it will have pretty heavy use. The NAS has 2 NICs, one to the main network, and one going straight to my VM host and that NIC is dedicated to the linux server VM. I wanted to keep it separate because of all the traffic that will be going on between the linux VM and FreeNAS, I wanted that off the main network. So the linux VM and FreeNAS have a direct connection, and I was going to connect to the NAS from the Windows clients across the main network since that will be for more normal use, but it will be to the same folders. How would you recommend setting this up?
 

ThePhantom0114

Dabbler
Joined
Oct 3, 2013
Messages
12
Alright cyberjock, I took your recommendation and will just stick with NFS or CIFS. I figure if I can make NFS work, I'll just share the folders I need in Windows through Samba on the linux server, and if I get CIFS to work then I can just map it straight into Windows and linux, so I think I can make either one work. Now I have a slightly different problem. I need to control permissions on the share by linux users, as there are multiple people that log into the linux server. I have gotten either CIFS or NFS to mount in linux, but I can't find a way to make the permissions that are set in linux actually stick. Is there a way to make this work with either NFS of CIFS?

For example, I have a huge media folder (my account on FreeNAS owns it, media group, same gid as linux) that I want a service account (on linux) to own (Sabnzbd and other apps use this account), say media, and the group media, with my personal account being in the media group, and I want it to have 775 permissions, so that media and anyone in the media group has full access, but others can only read and execute. That way others that connect to the linux VM can access the media share and pull files, but can't write or delete. Currently, with an NFS share, if I set mapall to my account, then no matter what, everyone has full rights, and if I set it to nobody, then no one has rights...with CIFS, my account has full rights, but the media account doesnt, no matter what the linux permissions show.

Can anyone help me with this?
 
Status
Not open for further replies.
Top