From: fweimer@... Date: 2020-04-03T17:01:44+00:00 Subject: [ruby-core:97696] [Ruby master Bug#16756] File.chmod does not work on links. Issue #16756 has been updated by fweimer (Florian Weimer). 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. ---------------------------------------- Bug #16756: File.chmod does not work on links. https://bugs.ruby-lang.org/issues/16756#change-84902 * Author: vo.x (Vit Ondruch) * Status: Open * Priority: Normal * Assignee: Eregon (Benoit Daloze) * ruby -v: ruby-2.8.0-810d66f3e7 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Now I observe different error after fix of #16749: ~~~ 1) File.lchmod changes the file mode of the link and not of the file ERROR Errno::ENOTSUP: Operation not supported @ apply2files - /builddir/build/BUILD/ruby-2.8.0-810d66f3e7/rubyspec_temp/32136/359-file_chmod_test.lnk /builddir/build/BUILD/ruby-2.8.0-810d66f3e7/spec/ruby/core/file/lchmod_spec.rb:21:in `lchmod' /builddir/build/BUILD/ruby-2.8.0-810d66f3e7/spec/ruby/core/file/lchmod_spec.rb:21:in `block (3 levels) in ' /builddir/build/BUILD/ruby-2.8.0-810d66f3e7/spec/ruby/core/file/lchmod_spec.rb:3:in `' ~~~ It seems that glibc 2.31.9000 does not support lchmod above links. May be I should rather report this against glibc? Not sure ... -- https://bugs.ruby-lang.org/ Unsubscribe: