Submitted an upstream fix with a regression test:
https://github.com/uutils/coreutils/pull/14512

In chmod_file_internal, symlinks encountered during recursive traversal
were bypassed as expected, but lacked an early return. Execution fell
through to the umask check for option-like modes (-w), triggering the
NewPermissions error against the symlink's 0777 mode.

The fix is an early return Ok(()) when skipping symlinks reached without
dereferencing.

In cause yuo wanna cherry pick it for the Ubuntu package:
https://github.com/uutils/coreutils/pull/14512.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167122

Title:
  chmod -R -w has wrong permissions through symlinks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2167122/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to