Permissions Issue

Status
Not open for further replies.

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
Bare with me while I try to explain exactly what I want to accomplish here. My main goal is to setup remote access through SFTP for certain users and have them locked to their own home directories. Also I want to have my own account be able to delete, copy or add files to any directory on the volume from any PC on my LAN through both CIFS, SFTP and NFS.

I have a FreeNAS setup with 1 volume which houses all of my data. I have setup SSH as per the FreeNAS SSH WiKi here: http://doc.freenas.org/index.php/SSH to allow remote users to connect. This actually works and they are locked to their respective home directories.

There are 2 users and 3 groups that I have created in FreeNAS.

Users
me(my account)
User1(remote user)

Groups
Friends
me(my own group)
SFTP

My account has the primary group as my own group. I have added the wheel group to my account under auxiliary groups. I have also added my group to the "wheel" group under members.

User1's primary group is "friends" and he is also attached to the SFTP group to allow SSH (SFTP) to function.

Now down to the main issue I have is that after setting up the SFTP access for the remote users, I cannot write to the dataset that I created for user1. So if I want to added or remove files from user1's dataset I would need to login as root through SSH or SFTP. I do not want to have to do this, I want to be able to use my account to manage all the files on the volume.

In order for user1 to be able to chroot into their home directory I needed to setup the Main volume's dataset and user1's dataset as follows: FreeNAS.jpg . All folders under "Data" (the main volume's dataset) have permissions setup as 755.

So basically as I stated above this comes down to not being able to write files to user1's dataset while accessing the share as my account which is associated with the wheel account and therefore should have rights to delete or add files to any dataset on the volume.
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
Bump... Anyone?
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
Over 100 views and no one has any ideas?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The problem is that identifying permissions issues are very hard if you don't know what you are doing. There's several places and lots of settings that can cause problems that will manifest themselves as improper permissions. The best advice I can give is to read up on how permissions work and experiment to figure out how to get it to work how you want.
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
The problem is that identifying permissions issues are very hard if you don't know what you are doing. There's several places and lots of settings that can cause problems that will manifest themselves as improper permissions. The best advice I can give is to read up on how permissions work and experiment to figure out how to get it to work how you want.

Well I did go through the WiKi and also did some research, I was coming here because I was running out of options/ideas.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Unfortunately permissions are one of those things that are best left to guides because of how detailed and complex the issue is. Then add in that each person has their own permissions they want to use and it quickly turns into a situation where the best person to do the job is you. :(
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
try using WinSCP go to /mnt choose folder and change the permission

I cannot change the permissions in WINSCP.

The problem really boils down to I want read/write/execute access for all of my PCs on the LAN. Then I want remote users locked to their respective home directories.

What I have found is that if I chmod 777 the parent directory, then all the PCs on my LAN can read/write/execute without an issue. This is a problem though because now chroot will not function, because it needs permission of the parent folder setup as 755.

So what I end up with is I can read any file on my LAN PCs, but I cannot write files or create folders on the parent (top) folder or the remote user's dataset.

Now what I can do is I can chmod 777 all other directories under the parent directory so that my LAN PCs can read/write/execute. But this still does not solve the issue of not being able to copy files or create folders in a remote users dataset or the parent directory, without logging into WINSCP as root.

What I can do is, i can log into my share on the LAN as root, although I would rather create my own user account and use that. This also means I would need "allow root access" for SSH if I want to manage my files remotely, which is not secure.
 
Joined
Feb 25, 2013
Messages
1
Good afternoon, everyone. First of all, I'm new to help you a lot if you would very much like Free NAS. My problem is, I want to add multiple users to a folder on Free NAS. Thank you in advance for your help.
 
Status
Not open for further replies.
Top