permissions with sftp and nfs

Status
Not open for further replies.

brizou

Dabbler
Joined
Feb 11, 2012
Messages
14
[solved] permissions with sftp and nfs

Hi,
First of all excuse me for my english, i'm french so....

I have a zfs pool on my nas that is mounted on my pc via nfs.

I tried to configure a sftp, it works locally. I wanted to restrict the permissions to limit the writing rights only to one user. so i did a
chown -R "user":wheel "pool zfs"
then
chmod -R 770 "pool zfs"

every works fine, only my user have writing permissions via sftp

The problem now is that I can't see my zfs pool via nfs, I don't have the authorisations .


Do you know any configuration that would work for what I want to do
 

brizou

Dabbler
Joined
Feb 11, 2012
Messages
14
ok, so I found how to do it. I'm going to give my solution if that can help other users

connection on freenas via ssh as root

Code:
ssh root@"nas_ip" -p "ssh_port"


then I changed the owner

Code:
chown -R "user":ftp "directory"


finally, i forbid the writing rights to the group ftp

Code:
chmod -R 757 "directory"


I also have been able to restrain ftp's users from visiting some directories

Code:
chmod -R 707 "sub-directory"


P.S : if this isn't good, please tell me
 
Status
Not open for further replies.
Top