Bug 1820722 - Missing lchmod support for symlinks
Summary: Missing lchmod support for symlinks
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-03 16:52 UTC by Vít Ondruch
Modified: 2020-10-05 08:30 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-03 17:01:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vít Ondruch 2020-04-03 16:52:19 UTC
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:

Comment 1 Florian Weimer 2020-04-03 17:01:21 UTC
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.

Comment 2 Vít Ondruch 2020-04-03 17:04:33 UTC
(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!


Note You need to log in before you can comment on or make changes to this bug.