Description of problem: It seems that the newly implemented lchmod in glibc 2.31.9000 is missing symlinks support. Is that deliberate or unintentional? https://bugs.ruby-lang.org/issues/16756 Version-Release number of selected component (if applicable): $ rpm -q glibc glibc-2.31.9000-6.fc33.x86_64 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Missing lchmod support for symlinks. Expected results: Working support for symlinks. Additional info:
This is deliberate because Linux does not support changing the mode of a symbolic link (except for file systems with bugs). The error code ENOTSUP is mandated by POSIX for this case. You can still use lchmod to avoid following symbolic links even in the presence of races, so it's still useful. I will also update the upstream bug.
(In reply to Florian Weimer from comment #1) > This is deliberate because Linux does not support changing the mode of a > symbolic link (except for file systems with bugs). The error code ENOTSUP is > mandated by POSIX for this case. You can still use lchmod to avoid following > symbolic links even in the presence of races, so it's still useful. Thank you for the explanation. > I will also update the upstream bug. And thank you million times for the upstream response. That is outstanding!