Bug 14700 - file owner not available when file unredable
Summary: file owner not available when file unredable
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.14.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
Depends on:
Reported: 2021-05-08 01:14 UTC by Björn Jacke
Modified: 2021-09-09 07:24 UTC (History)
3 users (show)

See Also:

Patch for 4.15 cherry-picked from master (3.33 KB, patch)
2021-08-08 12:20 UTC, Ralph Böhme
jra: review+
metze: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2021-05-08 01:14:40 UTC
the file/directory ownership is not available if a file/directory is not readable. The ownership should be readable in any case though.

I ran into this problem during some ACL testing: it *must* be possible to grant new permissions on a file/directory after you removed all permissions before - *if* you are the owner.
Comment 1 Ralph Böhme 2021-05-08 06:38:48 UTC
Is this a 4.14 regression? Does it work in 4.13?
Comment 2 Björn Jacke 2021-05-08 17:56:51 UTC
(In reply to Ralph Böhme from comment #1)
neither in 4.12/4.13. You can just check with a simple "touch file; chmod 000 file" and look at it in explorer.

(For the "revover from 0 ACEs" test there might be more issues but this is the first obvious one.)
Comment 3 Ralph Böhme 2021-05-08 19:50:08 UTC
(In reply to Björn Jacke from comment #2)
Ok, thanks for confirming. This can now be fixed in 4.14 thanks for pathref fsps.

WIP MR: https://gitlab.com/samba-team/samba/-/merge_requests/1950
Patch: https://gitlab.com/samba-team/samba/-/merge_requests/1950/diffs?commit_id=3deaf6514aea343023ed8f1035ed12877f37349f
Comment 4 Samba QA Contact 2021-08-02 18:06:11 UTC
This bug was referenced in samba master:

Comment 5 Ralph Böhme 2021-08-08 12:20:51 UTC
Created attachment 16721 [details]
Patch for 4.15 cherry-picked from master
Comment 6 Jule Anger 2021-08-09 11:27:17 UTC
Pushed to autobuild-v4-15-test.
Comment 7 Samba QA Contact 2021-08-09 12:06:15 UTC
This bug was referenced in samba v4-15-test:

Comment 8 Jule Anger 2021-08-09 12:29:25 UTC
Closing out bug report.

Comment 9 Samba QA Contact 2021-08-09 13:44:53 UTC
This bug was referenced in samba v4-15-stable:

Comment 10 Jeremy Allison 2021-08-10 16:04:12 UTC
Comment on attachment 16721 [details]
Patch for 4.15 cherry-picked from master

Sorry for being late, took a vacation day yesterday.
Comment 11 Ralph Böhme 2021-09-09 07:24:17 UTC
Fwiw, the fix relies on pathref fsps and a fully functional codebase that correctly uses pathref fsps everywhere in the VFS and in the VFS callers.

We can give these guarantees for 4.15 but not for 4.14 (older versions don't even have pathref fsps) which is why there's no patch for 4.14 included in this bugreport.