From: eregontp@... Date: 2020-04-03T22:49:32+00:00 Subject: [ruby-core:97702] [Ruby master Bug#16756] File.chmod does not work on links. Issue #16756 has been updated by Eregon (Benoit Daloze). I'm unsure how to resolve this. This means on Linux we have `File.respond_to?(:lchmod)` but it's basically unusable for its main purpose. I guess we'll have to do similar as a19228f878d955eaf2cce086bcf53f46fdf894b9, so accept both NotImplementedError and ENOTSUP and hardcode the fact Linux can't do lchmod(), because we can't detect it easily anymore. This might Ruby programs, notably those that would check `File.respond_to?(:lchmod)`, and those calling lchmod but expecting only success or NotImplementedError but not ENOTSUP. ---------------------------------------- Bug #16756: File.chmod does not work on links. https://bugs.ruby-lang.org/issues/16756#change-84907 * 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: