OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man2 / chown.2
index a234b5b..98aa961 100644 (file)
@@ -35,7 +35,7 @@
 .\"     (bsdgroups versus sysvgroups, and the effect of the parent
 .\"     directory's set-group-ID permission bit).
 .\"
-.TH CHOWN 2 2014-03-19 "Linux" "Linux Programmer's Manual"
+.TH CHOWN 2 2014-08-19 "Linux" "Linux Programmer's Manual"
 .SH NAME
 chown, fchown, lchown, fchownat \- change ownership of a file
 .SH SYNOPSIS
@@ -328,25 +328,7 @@ used only by the superuser (that is, ordinary users cannot give away files).
 .BR fchownat ():
 POSIX.1-2008.
 .SH NOTES
-The original Linux
-.BR chown (),
-.BR fchown (),
-and
-.BR lchown ()
-system calls supported only 16-bit user and group IDs.
-Subsequently, Linux 2.4 added
-.BR chown32 (),
-.BR fchown32 (),
-and
-.BR lchown32 (),
-supporting 32-bit IDs.
-The glibc
-.BR chown (),
-.BR fchown (),
-and
-.BR lchown ()
-wrapper functions transparently deal with the variations across kernel versions.
-
+.SS Ownership of new files
 When a new file is created (by, for example,
 .BR open (2)
 or
@@ -395,7 +377,22 @@ mount options are supported by ext2, ext3, ext4, and XFS.
 Filesystems that don't support these mount options follow the
 .IR "\-o\ nogrpid"
 rules.
-.PP
+.SS Glibc notes
+On older kernels where
+.BR fchownat ()
+is unavailable, the glibc wrapper function falls back to the use of
+.BR chown ()
+and
+.BR lchown ().
+When
+.I pathname
+is a relative pathname,
+glibc constructs a pathname based on the symbolic link in
+.IR /proc/self/fd
+that corresponds to the
+.IR dirfd
+argument.
+.SS NFS
 The
 .BR chown ()
 semantics are deliberately violated on NFS filesystems
@@ -408,6 +405,25 @@ Client side
 caching may lead to a delay between the time where ownership have
 been changed to allow access for a user and the time where the file can
 actually be accessed by the user on other clients.
+.SS Historical details
+The original Linux
+.BR chown (),
+.BR fchown (),
+and
+.BR lchown ()
+system calls supported only 16-bit user and group IDs.
+Subsequently, Linux 2.4 added
+.BR chown32 (),
+.BR fchown32 (),
+and
+.BR lchown32 (),
+supporting 32-bit IDs.
+The glibc
+.BR chown (),
+.BR fchown (),
+and
+.BR lchown ()
+wrapper functions transparently deal with the variations across kernel versions.
 
 In versions of Linux prior to 2.1.81 (and distinct from 2.1.46),
 .BR chown ()
@@ -477,10 +493,11 @@ main(int argc, char *argv[])
 .BR path_resolution (7),
 .BR symlink (7)
 .SH COLOPHON
-This page is part of release 3.65 of the Linux
+This page is part of release 3.79 of the Linux
 .I man-pages
 project.
 A description of the project,
-and information about reporting bugs,
+information about reporting bugs,
+and the latest version of this page,
 can be found at
 \%http://www.kernel.org/doc/man\-pages/.