Skip to contentSkip to conversation

man/man2/chmod.2: Document AT_SYMLINK_NOFOLLOW support

PATCH Superseded Benjamin Peterson 2 participants 4 messages May 30, 2025 – Jun 11, 2025 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 man/man2/chmod.2: Document AT_SYMLINK_NOFOLLOW support

Historically, Linux systems did not support the AT_SYMLINK_NOFOLLOW flag to fchmodat. glibc added userspace emulation support in version 2.32, and Linux gained native support in 6.5. See glibc.git 6b89c385d8bd0700b25bac2c2d0bebe68d5cc05d ("io: Implement lchmod using fchmodat [BZ #14578]") and linux.git 09da082b07bbae1c11d9560c8502800039aebcea ("fs: Add fchmodat2()").

---
 man/man2/chmod.2 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
man/man2/chmod.2 +3 -1
index 307589481..76dbfc6b2 100644
@@ -197,7 +197,6 @@ If
 .I path
 is a symbolic link, do not dereference it:
 instead operate on the link itself.
-This flag is not currently implemented.
 .P
 See
 .BR openat (2)
@@ -329,6 +328,9 @@ POSIX.1-2008.
 POSIX.1-2008.
 Linux 2.6.16,
 glibc 2.4.
+.BR AT_SYMLINK_NOFOLLOW
+glibc 2.32,
+Linux 6.5.
 .SH SEE ALSO
 .BR chmod (1),
 .BR chown (2),

Range-diff against v0:
-: --------- > 1: 6a1171eb1 man/man2/chmod.2: Document AT_SYMLINK_NOFOLLOW support

Signature · 1 line
2.48.1
#1 lore raw

Hi Benjamin,

Quoted 6 lines · Benjamin Peterson

Historically, Linux systems did not support the AT_SYMLINK_NOFOLLOW
flag to fchmodat. glibc added userspace emulation support in version
2.32, and Linux gained native support in 6.5. See
glibc.git 6b89c385d8bd0700b25bac2c2d0bebe68d5cc05d ("io: Implement lchmod using fchmodat [BZ #14578]") and
linux.git 09da082b07bbae1c11d9560c8502800039aebcea ("fs: Add fchmodat2()").

Please use 12 characters for the hash. Also, please include the commit date:

	glibc.git 6b89c385d8bd (2020-02-12; "io: Implement lchmod using fchmodat [BZ #14578]")
	linux.git 09da082b07bb (2023-07-27; "fs: Add fchmodat2()")

To generate those, I use a git alias:

	ref = show --no-patch --abbrev=12 --date=short \
		--format=tformat:'%C(auto)%h%C(reset) %C(dim white)(%cd%x3B \"%C(reset)%C(auto)%s%C(reset)%C(dim white)\")%C(reset)'

which I use as

	$ git ref 09da082b07bbae1c11d9560c8502800039aebcea
	09da082b07bb (2023-07-27; "fs: Add fchmodat2()")
Quoted 1 line

Thanks for the patch!

Quoted 17 lines
---
 man/man2/chmod.2 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
man/man2/chmod.2 +0 -1
index 307589481..76dbfc6b2 100644
@@ -197,7 +197,6 @@ If
 .I path
 is a symbolic link, do not dereference it:
 instead operate on the link itself.
-This flag is not currently implemented.
 .P
 See
 .BR openat (2)

man/man2/chmod.2 POSIX.1-2008. · line 330

Quoted 3 lines
man/man2/chmod.2 +0 -0
@@ -329,6 +328,9 @@ POSIX.1-2008.
 POSIX.1-2008.
 Linux 2.6.16,
 glibc 2.4.

You need to use .TP to format this correctly as a "tagged paragraph".

Have a lovely day!
Alex

Quoted 12 lines
man/man2/chmod.2 +3 -0
+.BR AT_SYMLINK_NOFOLLOW
+glibc 2.32,
+Linux 6.5.
 .SH SEE ALSO
 .BR chmod (1),
 .BR chown (2),

Range-diff against v0:
-: --------- > 1: 6a1171eb1 man/man2/chmod.2: Document AT_SYMLINK_NOFOLLOW support

Signature · 1 line
2.48.1
Signature · 1 line
<https://www.alejandro-colomar.es/>
#2 lore raw
Quoted 19 lines · Alejandro Colomar

Hi Benjamin,

Quoted 6 lines · Benjamin Peterson

Historically, Linux systems did not support the AT_SYMLINK_NOFOLLOW
flag to fchmodat. glibc added userspace emulation support in version
2.32, and Linux gained native support in 6.5. See
glibc.git 6b89c385d8bd0700b25bac2c2d0bebe68d5cc05d ("io: Implement lchmod using fchmodat [BZ #14578]") and
linux.git 09da082b07bbae1c11d9560c8502800039aebcea ("fs: Add fchmodat2()").

Please use 12 characters for the hash. Also, please include the commit date:

	glibc.git 6b89c385d8bd (2020-02-12; "io: Implement lchmod using 
fchmodat [BZ #14578]")
	linux.git 09da082b07bb (2023-07-27; "fs: Add fchmodat2()")

To generate those, I use a git alias:

Quoted 8 lines
	ref = show --no-patch --abbrev=12 --date=short \
		--format=tformat:'%C(auto)%h%C(reset) %C(dim white)(%cd%x3B 

\"%C(reset)%C(auto)%s%C(reset)%C(dim white)\")%C(reset)'

which I use as

	$ git ref 09da082b07bbae1c11d9560c8502800039aebcea
	09da082b07bb (2023-07-27; "fs: Add fchmodat2()")

I'll fix the message in v2.

It would be helpful to note the date guideline and maybe this git alias in CONTRIBUTING.d/patches/description. That's what I was trying to follow.

Quoted 4 lines
Quoted 2 lines

Thanks for the patch!

Thanks for the review. I'll send v2 shortly.

#3 lore raw

Hi Benjamin,

Quoted 13 lines · Benjamin Peterson
Quoted 13 lines

Please use 12 characters for the hash. Also, please include the commit date:

	glibc.git 6b89c385d8bd (2020-02-12; "io: Implement lchmod using 
fchmodat [BZ #14578]")
	linux.git 09da082b07bb (2023-07-27; "fs: Add fchmodat2()")

To generate those, I use a git alias:

	ref = show --no-patch --abbrev=12 --date=short \
		--format=tformat:'%C(auto)%h%C(reset) %C(dim white)(%cd%x3B 

\"%C(reset)%C(auto)%s%C(reset)%C(dim white)\")%C(reset)'

Quoted 8 lines
Quoted 4 lines

which I use as

	$ git ref 09da082b07bbae1c11d9560c8502800039aebcea
	09da082b07bb (2023-07-27; "fs: Add fchmodat2()")

I'll fix the message in v2.

It would be helpful to note the date guideline and maybe this git alias in CONTRIBUTING.d/patches/description. That's what I was trying to follow.

Thanks for the reminder! Indeed, someone suggested the same recently, and I forgot. :)

I'll do so today before I forget. Thanks!

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Thanks for the patch!

Thanks for the review. I'll send v2 shortly.

Cheers,
Alex

Signature · 1 line
<https://www.alejandro-colomar.es/>