Bug or user error re: home directory?

Status
Not open for further replies.

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Hi There,

I'm working on creating a user for SSH access. I've created a dataset called "Homes" and this dataset gives permission for anyone to read / write into it. I then create a new user, and I set his home directory as "Homes" ~ No error is given, and all works well. I put my public key in the user config screen, and I try to SSH in. Oddly enough, it asks for the user password. I enter it, and I'm in, but it shows me an error, saying that it couldn't change to home directory, permission denied. Odd...

So then I go into the shell in the web UI as root, and I take a look. The "Homes" dataset has the fully open permissions to anyone, but when I CD into that and check out the home directory that was created, I see that the owner is root / wheel. Shouldn't the owner of this folder be my user and the group be his group? I'm going to chown the folder, and I expect it should work, but shouldn't it be creating users who own their own home directories? Or do I not get how things work? Thanks!
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Quick update - I chown'd the group, and now I can SSH in just fine... seems like a bug to me, but I'm definitely a *nix permissions n00b.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
You can specify owner/group of the dataset when you create it, too (in addition to permissions), which you probably forgot to do.
Also, it's not enough to have read/write permissions. Directories (folders) need execute permission for people to be able to list the contents in it.
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
You can specify owner/group of the dataset when you create it, too (in addition to permissions), which you probably forgot to do.
I didn't forget this.
Also, it's not enough to have read/write permissions. Directories (folders) need execute permission for people to be able to list the contents in it.
This is a great point, and one I wasn't aware of. I'm traveling for the next ten days, but I'll check this out as soon as I get back. I wonder if "execute" privs weren't enabled. Now that being said, if I didn't put the right privs, that would be user error. But not having FreeNAS throw an error when I entered my SSH key would be a FreeNAS error, as it wasn't possible for it to save it.
 
Status
Not open for further replies.
Top