Hello,
I got an odd behavior on my system and I'd be interested to understand it.
I tried to search the forum and online but I get results mainly focusing on creating shares and such... :-O
I did find some information thought and I used it to try to understand what's happening (see below).
TL;DR summary: SMB share working fine, server does hard reboot (nothing else noticeable), SMB share in read only... What happened? How can I troubleshoot it? (trying to understand)
Context:
I have a main FreeNAS server (v9.3.10, 64GB RAM, Xeon x5760), one user defined (say user1) with several datasets, every dataset has user1 as owner.
SMB shares exist for the datasets.
Nothing fancy, it's a one user set-up and worked very well so far.
There is a backup FreeNAS server (v9.3.10), same user configured (UID and GID are the same), same datasets with user1 as owner.
Client is a windows computer.
Issue:
All of a sudden I only have read access on the SMB shares on the main server with user1.
From a client's perspective, nothing changed.
From a server's perspective: I experience a hard reboot in the morning, that is the only noticeable thing that happened. Don't know if it is linked somehow.
Investigations:
On the backup system:
I tested the shares on the backup server (with user1), works fine.
On the main system:
I tested using a different clients (windows 7, 10 and Linux) with user1 on the main server: only read access.
I created a new dataset, configured with user1 as owner: only read access.
Created a new user, change the owner of the new dataset to this new user: write access.
When accessing over SSH, on the different datasets, the owner is set correclty (user1 for existing datasets or new user for new dataset). So it appears that at system level (linux access rights) it works as expected, so it might be somewhere at samba level that something's not right...
Few things I checked:
Question:
I'm not familiar with investigating samba and I only have a limited understanding of it... (so far it worked great! :-O) I gathered some pieces from searches but this might not be a very consistent approach.
But this is a good opportunity to understand it better and I'd like to have some guidance in troubleshooting it.
What would be the steps to troubleshoot a problem like that?
So far I have the feeling there is something wrong at samba level with user1 on the main server but I can't pinpoint it.
I could delete user1 and recreate it, it might fix the issue... But before doing that, I'd like to try to understand what's happening, if possible...
Thanks for your guidance.
I got an odd behavior on my system and I'd be interested to understand it.
I tried to search the forum and online but I get results mainly focusing on creating shares and such... :-O
I did find some information thought and I used it to try to understand what's happening (see below).
TL;DR summary: SMB share working fine, server does hard reboot (nothing else noticeable), SMB share in read only... What happened? How can I troubleshoot it? (trying to understand)
Context:
I have a main FreeNAS server (v9.3.10, 64GB RAM, Xeon x5760), one user defined (say user1) with several datasets, every dataset has user1 as owner.
SMB shares exist for the datasets.
Nothing fancy, it's a one user set-up and worked very well so far.
There is a backup FreeNAS server (v9.3.10), same user configured (UID and GID are the same), same datasets with user1 as owner.
Client is a windows computer.
Issue:
All of a sudden I only have read access on the SMB shares on the main server with user1.
From a client's perspective, nothing changed.
From a server's perspective: I experience a hard reboot in the morning, that is the only noticeable thing that happened. Don't know if it is linked somehow.
Investigations:
On the backup system:
I tested the shares on the backup server (with user1), works fine.
On the main system:
I tested using a different clients (windows 7, 10 and Linux) with user1 on the main server: only read access.
I created a new dataset, configured with user1 as owner: only read access.
Created a new user, change the owner of the new dataset to this new user: write access.
When accessing over SSH, on the different datasets, the owner is set correclty (user1 for existing datasets or new user for new dataset). So it appears that at system level (linux access rights) it works as expected, so it might be somewhere at samba level that something's not right...
Few things I checked:
- I ran a scrub of the boot drive, no errors (I thought maybe the hard reboot might have get some files corrupted on the boot drive?).
- I checked
/etc/local/smb4.conf
: they are identical on both servers (main and backup). - Ran
getfacl /mnt/tank/new_dataset
, nothing out of order, I get an output like:
Code:
getfacl /mnt/tank/new_dataset/# file: /mnt/tank/new_dataset/# owner: user1# group: workgroupowner@:rwxp--aARWcCos:-------:allowgroup@:r-x---a-R-c--s:-------:alloweveryone@:r-x---a-R-c--s:-------:allow
- Ran
pdbedit -L -v -u user1
. Outputs are similar for both servers (besides of the user SID and primary group SID, which seems to be expected (I thought first I might have an SID problem but I'm not sure anymore). - Tried
pdbedit -a -u user1
on the main server but didn't have any effect, still only read access. - Had a look at the samba logs in
/var/log/samba4
. I'm not saying I understand them!But I compared them with the logs on the backup server and I couldn't see anything really different...
Question:
I'm not familiar with investigating samba and I only have a limited understanding of it... (so far it worked great! :-O) I gathered some pieces from searches but this might not be a very consistent approach.
But this is a good opportunity to understand it better and I'd like to have some guidance in troubleshooting it.
What would be the steps to troubleshoot a problem like that?
So far I have the feeling there is something wrong at samba level with user1 on the main server but I can't pinpoint it.
I could delete user1 and recreate it, it might fix the issue... But before doing that, I'd like to try to understand what's happening, if possible...
Thanks for your guidance.