Unlike the GNU implementation of coreutils uutils doesn't use access which means ACL's are not taking into account or that root can write into a users home directory:
A simple reproducer:
root@ubuntu:~# ls -lh /home/admin/test.txt
-rw-r--r-- 1 admin admin 4 Jun 29 08:14 /home/admin/test.txt
root@ubuntu:~# test -w /home/admin/test.txt && echo 'write'
write
root@ubuntu:~# /usr/lib/cargo/bin/coreutils/test -w /home/admin/test.txt && echo "write"
root@ubuntu:~#
root@ubuntu:~# /usr/bin/gnutest -w /home/admin/test.txt && echo "write"
write
This issue is reproducible on Ubuntu 26.04 with uutils 0.8.0. The Git main version does not use the access syscall so still suffers from the same issue.
Unlike the GNU implementation of coreutils uutils doesn't use
accesswhich means ACL's are not taking into account or that root can write into a users home directory:A simple reproducer:
This issue is reproducible on Ubuntu 26.04 with uutils 0.8.0. The Git main version does not use the access syscall so still suffers from the same issue.