Can't write to own home directory over Samba

Status
Not open for further replies.

Dwarf Cavendish

Contributor
Joined
Dec 19, 2017
Messages
121
Yesterday I set up my NAS with FreeNAS 11.1 and most things appear to work fine. However, I have by now spent hours getting home directories to work over samba.

The dataset and share settings look like this:

homeDatasetPermissions.png homeShareSettings.png

My user settings (for my own user account) look like this:
userSettings1.png userSettings2.png

What I noticed yesterday is when I removed write permissions for anyone but myself I could not open my home share in Windows anymore. Also, I cannot write to home shares. When I look at the permission from Windows they look like this:

shareSecurity.png

I could relate this to the ownership of the dataset, however, dataset ownership does not seem to have any effect on the permissions shown in the last screenshot. I also still cannot write to my home directory. Other datasets/shares work fine, though, and I can change permissions using Windows there. Can someone tell my how I am supposed to configure this? I searched https://doc.freenas.org/11/sharing.html#windows-smb-shares for "home", but I could did not find anything helpful there. Also, wheel has write access to the home share, but adding myself to the wheel group doesn't give me write access (apart from the fact that it would be a hairy solution).

Something else that worries me a bit: yesterday I was able to change homedir permissions for users, but today I couldn't anymore, for any of the users I made. It just reverts to 775 now, which I believe was the last setting I tried to get home shares working. What could be causing this? When I try to do chmod -R 700 on a homedir in a terminal, it says "operation not permitted".

I hope that someone can help me out, thanks in advance.
 
Last edited:

Dwarf Cavendish

Contributor
Joined
Dec 19, 2017
Messages
121
...and I managed to fix things, although I am not sure if I did it right.

In the terminal I noticed that ls -l stated root as the homedirs' owner. By putting the dataset in Unix mode and doing some chown/chgrp and chmod commands I got the ownership right and I can now write stuff into my home directory. But I doubt if this is the way I am supposed to configure things. Any thoughts?
 

stevetoza

Dabbler
Joined
Jan 6, 2017
Messages
20
Having the same issue as well, When checking the permissions on the users home folder root/wheel are the owners. The only way I could get this working was by
Code:
chown -R user:user /mnt/tank/home/user


Wondering if theres a step we both missed.
 

Dwarf Cavendish

Contributor
Joined
Dec 19, 2017
Messages
121
Having the same issue as well, When checking the permissions on the users home folder root/wheel are the owners. The only way I could get this working was by
Code:
chown -R user:user /mnt/tank/home/user


Wondering if theres a step we both missed.

So basically you did the same thing I did :) . Assuming that you are using Windows clients: did you manage to successfully switch back to Windows permissions for your dataset? I am a bit reluctant to try that now.
 

stevetoza

Dabbler
Joined
Jan 6, 2017
Messages
20
So basically you did the same thing I did :) . Assuming that you are using Windows clients: did you manage to successfully switch back to Windows permissions for your dataset? I am a bit reluctant to try that now.
I kept the sharing type as unix from the off as I dont have any windows clients. Either we have both set this up wrong or the home folder for the user is not getting the owners set correctly. Im a little confused!
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
What version of freenas? I think I in 11.1 user directories have root ownership. It's a bug that should be filed.
 

Dwarf Cavendish

Contributor
Joined
Dec 19, 2017
Messages
121
Sounds like a bug. Please create a report at bugs.freenas.org and post the issue number here.

I see someone beat me to it :) . But now that I have fixed the ownership in the terminal, should I be able to safely change the permission mode of the .../home directory back to Windows again? I am a bit reluctant to just try it at this point, as I have accumulated some stuff there by now.

By the way, I am using 11.1-RELEASE too.
 
Last edited:

stevetoza

Dabbler
Joined
Jan 6, 2017
Messages
20
I see someone beat me to it :) . But now that I have fixed the ownership in the terminal, should I be able to safely change the permission mode of the .../home directory back to Windows again? I am a bit reluctant to just try it at this point, as I have accumulated some stuff there by now.

By the way, I am using 11.1-RELEASE too.
I should have some time tomorrow will give this a try and see what happens ;)
 
Status
Not open for further replies.
Top