Issue with access rights through SSH (ACLs and LDAP)

beharim

Cadet
Joined
Aug 8, 2023
Messages
8
Greetings all :)

I've got a little issue using TrueNAS Core (13.0-U5) that gives me headache..
I've created a whole true structure of datasets , with specific ACLs according to users and groups defined in a samba domain controller. Then, using SMB, everything is shared on the network and it's working fine, from the user point of view at least.

Yet, I have noticed some inconsistencies when the user is connected through SSH, when I try to go back to the parent dataset. Despite the exact same ACLs, some datasets throw a Permission denied error, some others work fine. I guess I have made a mistake somewhere but I can't find out where..

Here is a screenshot to show the problem (I'm forced to use the absolute path if I want to go back to the DonneesAcquisition dataset) :
1692597455506.png


Another screenshot to show the ACLs on both datasets :
1692597510105.png



It isn't a major issue, I could live with it.. but I'm kinda bothered not to be able to understand why it does not work the way I expect it to work, which means either I'm wrong somewhere in my understanding of TrueNAS and its configuration, or there is problem on my server ^^
If you ever have any idea to investigate more, I'm interested !

Thanks in advance,
Regards,
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
SSH is a direct connection to the server, not a sharing protocol.

Permissions from shares will not apply in any way at all to file browsing done on the host over SSH, which applies only UNIX permissions (the ones you see with ls -l), not ACLs (which you see with getfacl)
 

beharim

Cadet
Joined
Aug 8, 2023
Messages
8
Thanks for your reply.

I'm sorry, I guess it was not very clear in my post but the ACLs are set on datasets not on shares. Maybe I understood it wrong, but I thought it corresponded to extended UNIX permissions. At least, it works that way as, when I connect to my TrueNAS server through SSH, the user only has the rights I set up through the dataset's ACL menu.

If I do a ls it only shows this :
1692605254681.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
when I connect to my TrueNAS server through SSH, the user only has the rights I set up through the dataset's ACL menu
maybe have a look at ls -la (which should also show the . and .. entries).
 

beharim

Cadet
Joined
Aug 8, 2023
Messages
8
So here is the result of ls -al on the different datasets :
1692610801859.png


Despite the fact Atmosphere and Geochimie have been created the same way, I got a permission denied on Geochimie..
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It looks like that ".." entry has permissions issues... maybe try to set it (maybe need sudo) to what matches the rest.
 

beharim

Cadet
Joined
Aug 8, 2023
Messages
8
Parent dir :
1692613859289.png


Subdir with the problem :
1692613895653.png


Sudbir without the problem :
1692613920649.png


I just don't see where the problem could come from ^^
 

beharim

Cadet
Joined
Aug 8, 2023
Messages
8
Here :
1692622185286.png


On other sub datasets of OVPF-NAS, I have no problem about rights. This is really weird to me, as I thought I ahve mastered TrueNAS ACLs, I was able to set up very specific rights for several groups, all is working perfectly. But on this dataset, which is supposed to be simpler, I don't succeed to make it right and it really bothers me.. ^^
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
A few suggestions since I don't see anything immediately obvious.
1. use `getfacl -n` to display numeric IDs on the ACLs rather than names (and repeat above) Since you mention LDAP it's possible you have a user that exists both locally and on the LDAP server. If you have a local user 3000 that is `sysop` and an LDAP user 5000 that is also `sysop` then getpwuid will return sysop for both, but access will appear erratic because authorization depends on UID / GID rather than names.

2. during your SSH session run command `id` to see your user/group/grouplist for the currently-authenticated user.
 

beharim

Cadet
Joined
Aug 8, 2023
Messages
8
Thanks for your help, here is the screenshot :
1692940714034.png


The result is the same as root. I don't have a local user sysop, this is really weird..
 
Top