Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chmod: -L option fails to traverse symlinks #7023

Open
jfinkels opened this issue Dec 29, 2024 · 3 comments · May be fixed by #7025
Open

chmod: -L option fails to traverse symlinks #7023

jfinkels opened this issue Dec 29, 2024 · 3 comments · May be fixed by #7025

Comments

@jfinkels
Copy link
Collaborator

Environment: uutils main branch (git commit dddbc17), gnu coreutils version 9.5.218-7e5b6

Steps to reproduce:

# Create a file at `a/b/file` and a link to it at `a/c/link`.
mkdir -p a/b a/c
touch a/b/file
ln -s ../b/file a/c/link

# Explicitly set the permissions to start from.
chmod =777 a/b a/c a/b/file

# Set the new permissions.
chmod 755 -L -R a/c

What happens now: with uutils chmod, the permissions of the target of the symbolic link have not been changed:

$ ls -ld a/b/file
-rwxrwxrwx 1 jeffrey jeffrey 0 Dec 29 14:32 a/b/file

What I expected to happen: in GNU chmod, the permissions of the target are changed:

$ ls -ld a/b/file
-rwxr-xr-x 1 jeffrey jeffrey 0 Dec 29 14:32 a/b/file

Notes: this is causing a failure in the tests/chmod/symlinks.sh file in the GNU test suite.

@sylvestre
Copy link
Contributor

sylvestre commented Dec 29, 2024

Yeah, I just activated the option in #7017 and now working on the implementation

@sylvestre
Copy link
Contributor

sylvestre commented Dec 29, 2024

And welcome back :)

@jfinkels
Copy link
Collaborator Author

Thanks! I'll stick with reviewing some failing test cases for now.

@sylvestre sylvestre linked a pull request Dec 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants