-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Component
tail
Description
uutils checks path.exists() before opening the file. Path::exists() returns false on metadata errors (including EACCES), so a permission error is reported as “No such file or directory” and the open is never attempted. GNU tail attempts the open and reports the real errno.
Test / Reproduction Steps
# As root:
mkdir /tmp/noexec
echo secret > /tmp/noexec/file
chmod 000 /tmp/noexec
# As unprivileged user:
tail -n 1 /tmp/noexec/file
# GNU: "tail: cannot open '/tmp/noexec/file' for reading: Permission denied"
# uutils: "tail: cannot open '/tmp/noexec/file' for reading: No such file or directory"Impact
Incorrect diagnostics and follow/retry behavior can break scripts that rely on accurate error reporting.