Incorrect output for files with ACL
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
There is a problem related to the "+" mark in version 0.6.0 (the newest released version at the moment of writing), and a different but similar issue can be seen on 0.2.2 (used in Ubuntu 25.10) which may also be of interest.
Version 0.2.2
$ ls --version
ls (uutils coreutils) 0.2.2
used in Ubuntu 25.10 had a problem that "+" ACL status is sometimes displayed incorrectly; it is based on files in the current directory. It can be demonstrated for example this way.
f - has ACL
test2/f - does not have ACL
Correct:
$ ls -l f test/f
-rw-rw-r--+ 1 bug bug 0 Mar 7 09:45 f
-rw-rw-r-- 1 bug bug 0 Mar 7 09:45 test/f
Also correct:
$ ls -l
total 0
-rw-rw-r--+ 1 bug bug 0 Mar 7 09:45 f
drwxrwxr-x 1 bug bug 2 Mar 7 09:45 test
Incorrect ('f' exists also in cwd but is different with respect to ACL):
$ ls -l test
total 0
-rw-rw-r--+ 1 bug bug 0 Mar 7 09:45 f
Actually, the problem is not just with the "+" indicator but also the permission bits shown are incorrect for the same reason.
Version 0.6.0
I tried with the newest released version 0.6.0. Now the "+" marker displays correctly, but in some cases there is no padding between the mode and number of links. I guess that status of listxattr for items in cwd is sometimes taken to determine if additional padding is needed.
$ ~/coreutils-x86_64-unknown-linux-gnu/coreutils --version
coreutils 0.6.0 (multi-call binary)
Correct:
$ ~/coreutils-x86_64-unknown-linux-gnu/coreutils ls -l f test/f
-rw-rw-r--+ 1 bug bug 0 Mar 7 09:45 f
-rw-rw-r-- 1 bug bug 0 Mar 7 09:45 test/f
Also correct:
$ ~/coreutils-x86_64-unknown-linux-gnu/coreutils ls -l
total 0
-rw-rw-r--+ 1 bug bug 0 Mar 7 09:45 f
drwxrwxr-x 1 bug bug 2 Mar 7 09:45 test
Also correct, unlike in version 0.2.2:
$ ~/coreutils-x86_64-unknown-linux-gnu/coreutils ls -l test
total 0
-rw-rw-r-- 1 bug bug 0 Mar 7 09:45 f
Padding problem
When 'test/f' has ACL and 'f' does not, the information is still correct but padding is wrong (visible the third output):
Correct:
$ ~/coreutils-x86_64-unknown-linux-gnu/coreutils ls -l f test/f
-rw-rw-r-- 1 bug bug 0 Mar 7 09:45 f
-rw-rw-r--+ 1 bug bug 0 Mar 7 09:45 test/f
Also correct:
$ ~/coreutils-x86_64-unknown-linux-gnu/coreutils ls -l
total 0
-rw-rw-r-- 1 bug bug 0 Mar 7 09:45 f
drwxrwxr-x 1 bug bug 2 Mar 7 09:45 test
Correct except of padding (admittedly, I did not compare it with GNU coreutils):
$ ~/coreutils-x86_64-unknown-linux-gnu/coreutils ls -l test
total 0
-rw-rw-r--+1 bug bug 0 Mar 7 09:45 f
Compare with 0.2.2 from Ubuntu - does not display the "+" mark which is not correct:
$ ls -l test
total 0
-rw-rw-r-- 1 bug bug 0 Mar 7 09:45 f
Syscalls problem
In addition, for ~/coreutils-x86_64-unknown-linux-gnu/coreutils ls -l test, 0.6.0 calls the related syscall twice: first for 'f' (which refers to cwd) and then for 'test/f'. This may contribute to #8350.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the coreutils ls entry point and reproduce the reported commands against files with and without ACLs, using both 0.2.2 and 0.6.0 behavior as context. Trace the ACL status, permission bits, padding, and repeated syscall cases for paths such as f and test/f. Done means ls reports each path independently with correct markers, permissions, spacing, and syscall behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100