Shares and Permissions

Status
Not open for further replies.

Fabio Rodrigues

Dabbler
Joined
Oct 20, 2016
Messages
40
Hello,

I have two questions:

1) I need to create a Windows and a Linux share for the same data. What would be the best/safest way to do that? How to set the permissions?

2) Some users will need to connect to the Linux share from machines that are not in the domain, so I will need to create a local account for that. How should I create this local user in FreeNAS and how to grant permissions to this user to have access only the data (/mnt) they need and not the FreeNAS OS folders as well (/root, /var, /etc, ...)?

Thanks.
 

Fabio Rodrigues

Dabbler
Joined
Oct 20, 2016
Messages
40
Thanks for the videos m0nkey_!
As I need to select "Share Type" (Windows or Unix) when I create my dataset, is it possible to share the same dataset with SMB and NFS shares?
To complicate even more, the users that would access the SMB share are in the domain, and the ones that would access the NFS share are not in the domain. Do you see any solution for this situation?
Thanks.
 

Fabio Rodrigues

Dabbler
Joined
Oct 20, 2016
Messages
40
Thanks for the videos m0nkey_!
As I need to select "Share Type" (Windows or Unix) when I create my dataset, is it possible to share the same dataset with SMB and NFS shares?
To complicate even more, the users that would access the SMB share are in the domain, and the ones that would access the NFS share are not in the domain. Do you see any solution for this situation?
Thanks.

What if I create a local user and group in my FreeNAS, give permissions to the share and mount the smb share in the linux machines?
 

Fabio Rodrigues

Dabbler
Joined
Oct 20, 2016
Messages
40
Hello,

I created a local user and group in FreeNAS, I gave permissions to the share but when I try to mount the cifs share in another linux server I get an error:

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

If I try to ssh using the same user I'm using to mount the share, I have access. Any ideas?
 

Fabio Rodrigues

Dabbler
Joined
Oct 20, 2016
Messages
40
Here is what I added in the /etc/fstab:

//servername/share /mnt/folder cifs dir_mode=0775,file_mode=0775,rw,nounix,auto,credentials=/etc/credentialsfile,iocharset=utf8 0 0

and this is the content of credentialsfile:

username=user
password=password

and I'm running "mount /mnt/folder" to mount the folder.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Here is what I added in the /etc/fstab:

//servername/share /mnt/folder cifs dir_mode=0775,file_mode=0775,rw,nounix,auto,credentials=/etc/credentialsfile,iocharset=utf8 0 0

and this is the content of credentialsfile:

username=user
password=password

and I'm running "mount /mnt/folder" to mount the folder.

Are you able to mount it using mount.cifs? mount.cifs -o /etc/credentialsfile"//<ip address of server>/share" /mnt/folder
If not, what error is being generate on the Client and the FreeNAS Server? (you may have to increase logging verbosity on the FreeNAS server and review /var/log/samba4/log.smbd).
 

Fabio Rodrigues

Dabbler
Joined
Oct 20, 2016
Messages
40
Are you able to mount it using mount.cifs? mount.cifs -o /etc/credentialsfile"//<ip address of server>/share" /mnt/folder
If not, what error is being generate on the Client and the FreeNAS Server? (you may have to increase logging verbosity on the FreeNAS server and review /var/log/samba4/log.smbd).

It is working now, thanks!
 
Status
Not open for further replies.
Top