SOLVED Can access SMB share root, children invisible and have no permissions. chmod fails.

AdianIV

Dabbler
Joined
Feb 7, 2015
Messages
26
I have a new TrueNAS Mini XL+ with 32GB of memory running TrueNAS-13.0-U1.1.

I'm much more familiar with Windows systems than Linux/Unix, but I can generally follow instructions and documentation. However, when it comes to Linux/Unix, I have little experience and don't know what I don't know.

Problem
Originally I was able to see the share defined below and all the files I was copying into it from my previous NAS. I had to do some troubleshooting to get my Windows login to connect without an authentication prompt. It was around the time that I got that to work that I noticed that the share was security trimming all of its contents. The cause is almost certainly my fumbling changes to Share/File ACLs to get seamless login to work, though unfortunately I don't have a solid list of what changes I made/backed out. All my changes were done through the TrueNAS UI.

I can create/modify/delete new files and folders, I just can't see the ones that were created previously.

Setup Information
This NAS is currently configured with a single pool named "DataPool" under which there is a single dataset named "Unsorted." Unsorted was configured with a share type of SMB, and the SMB service is running.

A single user that we'll call "bob" has been configured with a primary group of "builtin_users" and no auxiliary groups. Microsoft Account and Samba Authentication are both checked, as are locked and disabled, and home directory is /nonexistent. Email matches that of my Microsoft account, and password also matches the password of my Microsoft account. I am logged into a Windows 10 machine with the associated Microsoft account.
bobConfig.png


I do not have a domain.

Share ACLs are set up to grant full permissions to both "Everyone" and "NT Authority/Authenticated Users." They were both added during troubleshooting just to be sure. The intent was to control access via file ACLs.
ShareACL.png


File ACLs are set to have root:wheel as the owner on Unsorted and all children. owner@, group@, and everyone@ are applied to the share and all children with their default configurations. Finally, I added ACLs for GROUP:builtin_users and USER:bob.
FileACL.png


Troubleshooting
I confirmed that the data was still there via the shell:
UnsortedContents.png

I did notice that the Unsorted folder now had two new folders, bob and bob_gmail.com (blacked out in the image above). I'm not sure why these folders are there, or if they're an expected part of Microsoft account integration.

I see that Unsorted has permissions applied to it, but all of its children do not:
UnsortedPermissions.png

UnsortedChildPermissions.png


I attempted to correct the permissions on a single file with chmod to see if it would address my issue. I received the error, "Operation not permitted."
chmodError.png

(Not in the screenshot, another attempt with "sudo chmod -v 771 /mnt/DataPool/Unsorted/List-OldNAS-Movies.txt" that resulted in the same error)

Most of the information I found online referred to root not having ownership to change permissions, which does not appear to be the issue in my case. I also found references to the "+" at the end of the permission string indicating that ACLs are applied and could be the problem. As far as I know, I'm not setting anything in the ACLs that would prevent root from updating permissions.

I found a post that mentioned a similar issue when the files/folders were set to immutable. Unfortunately, it doesn't look like there are any attributes set on the files/folders that do not display:
UnsortedChildAttributes.png


At this point, I'm not entirely certain what the issue is and wanted to reach out for some more expert help. I attempted to provide as much information as I could, but of course I'd be happy to provide anything additional that might be needed.
 

AdianIV

Dabbler
Joined
Feb 7, 2015
Messages
26
I had re-created the share several times during my troubleshooting, which never resolved the issue.

I rebooted my system and deleted/recreated the share yet again, and this time the files were visible. I'm not sure why the restart was required for this to work as I don't believe it should have been.

In any case, my issue is resolved.
 
Top