Does Samba need some kind of permissions/ACLs set on a *subdir*, for that subdir to appear in a list of contents of its *parent*?

0

I'm on FreeBSD and I've hit a quirky issue, that surprises me.

I created a share, and within that share created a subdirectory called subdir. When I open smbclient with current directory = share root, subdir isn't listed in the directory listing. But when I grant everyone@:full_set:allow ACE (and nothing else) on subdir via SSH in another window, the smbclient session can now see the directory in the "ls" listing.

In fact even everyone@:a:allow ACE (and nothing else) set on the subdir is enough to cause the subdir to be listed in its parent dir. (Thanks for the tip @grawity)

I'm aware that samba can hide files from a client if the ACL doesn't allow read rights on its parent dir, or if it a veto file/dir, or hiding hidden files is set, or if it's explicitly hidden by name in some other way, but those aren't in use - I just created the dir and share, and I haven't created any references or properties related to hiding it.

Otherwise, as far as I'm aware, the ability to see a file in a directory is strictly governed by the parent directory's "r" attribute... isn't it?

What I'm getting is: add a ACE on the child -> child visible in parent's directory listing. Remove a ACE from child -> doesn't show up in parents directory listing.

Am I missing something here, or what's going on? Why does it seem to need an ACE set on the child to see it within ls <parent>? Why should a child's ACE matter?

Stilez

Posted 2018-05-31T03:35:58.443

Reputation: 1 183

Have you tried adding just one individual permission or so, until it becomes visible? – user1686 – 2018-05-31T03:53:37.420

Yes. If the subdir has everyone@:a::allow as its sole ACE, and nothing else (all other ACEs deleted), it appears in its parent dir listing. Change that a to anything else, it doesn't. Question edited to be more specific on the flag – Stilez – 2018-05-31T04:04:22.003

No answers