|
rpm-build |
0a0c83 |
.\" Access Control Lists manual pages
|
|
rpm-build |
0a0c83 |
.\"
|
|
rpm-build |
0a0c83 |
.\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
|
|
rpm-build |
0a0c83 |
.\"
|
|
rpm-build |
0a0c83 |
.\" This is free documentation; you can redistribute it and/or
|
|
rpm-build |
0a0c83 |
.\" modify it under the terms of the GNU General Public License as
|
|
rpm-build |
0a0c83 |
.\" published by the Free Software Foundation; either version 2 of
|
|
rpm-build |
0a0c83 |
.\" the License, or (at your option) any later version.
|
|
rpm-build |
0a0c83 |
.\"
|
|
rpm-build |
0a0c83 |
.\" The GNU General Public License's references to "object code"
|
|
rpm-build |
0a0c83 |
.\" and "executables" are to be interpreted as the output of any
|
|
rpm-build |
0a0c83 |
.\" document formatting or typesetting system, including
|
|
rpm-build |
0a0c83 |
.\" intermediate and printed output.
|
|
rpm-build |
0a0c83 |
.\"
|
|
rpm-build |
0a0c83 |
.\" This manual is distributed in the hope that it will be useful,
|
|
rpm-build |
0a0c83 |
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
rpm-build |
0a0c83 |
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
rpm-build |
0a0c83 |
.\" GNU General Public License for more details.
|
|
rpm-build |
0a0c83 |
.\"
|
|
rpm-build |
0a0c83 |
.\" You should have received a copy of the GNU General Public
|
|
rpm-build |
0a0c83 |
.\" License along with this manual. If not, see
|
|
rpm-build |
0a0c83 |
.\" <http://www.gnu.org/licenses/>.
|
|
rpm-build |
0a0c83 |
.\"
|
|
rpm-build |
0a0c83 |
.Dd March 23, 2002
|
|
rpm-build |
0a0c83 |
.Dt ACL_SET_FILE 3
|
|
rpm-build |
0a0c83 |
.Os "Linux ACL"
|
|
rpm-build |
0a0c83 |
.Sh NAME
|
|
rpm-build |
0a0c83 |
.Nm acl_set_file
|
|
rpm-build |
0a0c83 |
.Nd set an ACL by filename
|
|
rpm-build |
0a0c83 |
.Sh LIBRARY
|
|
rpm-build |
0a0c83 |
Linux Access Control Lists library (libacl, \-lacl).
|
|
rpm-build |
0a0c83 |
.Sh SYNOPSIS
|
|
rpm-build |
0a0c83 |
.In sys/types.h
|
|
rpm-build |
0a0c83 |
.In sys/acl.h
|
|
rpm-build |
0a0c83 |
.Ft int
|
|
rpm-build |
0a0c83 |
.Fn acl_set_file "const char *path_p" "acl_type_t type" "acl_t acl"
|
|
rpm-build |
0a0c83 |
.Sh DESCRIPTION
|
|
rpm-build |
0a0c83 |
The
|
|
rpm-build |
0a0c83 |
.Fn acl_set_file
|
|
rpm-build |
0a0c83 |
function associates an access ACL with a file or directory, or
|
|
rpm-build |
0a0c83 |
associates a default ACL with a directory. The pathname for the file or
|
|
rpm-build |
0a0c83 |
directory is pointed to by the argument
|
|
rpm-build |
0a0c83 |
.Va path_p .
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The effective user ID of the process must match the owner of the file or
|
|
rpm-build |
0a0c83 |
directory or the process must have the CAP_FOWNER capability for the
|
|
rpm-build |
0a0c83 |
request to succeed.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The value of the argument
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
is used to indicate whether the access ACL or the default ACL associated
|
|
rpm-build |
0a0c83 |
with
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
is being set. If the
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
parameter is ACL_TYPE_ACCESS, the access ACL of
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
shall be set. If the
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
parameter is ACL_TYPE_DEFAULT, the default ACL of
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
shall be set. If the argument
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
specifies a type of ACL that cannot be associated with
|
|
rpm-build |
0a0c83 |
.Va path_p ,
|
|
rpm-build |
0a0c83 |
then the function fails.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The
|
|
rpm-build |
0a0c83 |
.Va acl
|
|
rpm-build |
0a0c83 |
parameter must reference a valid ACL according to the rules described on the
|
|
rpm-build |
0a0c83 |
.Xr acl_valid 3
|
|
rpm-build |
0a0c83 |
manual page if the
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
parameter is ACL_TYPE_ACCESS, and must either reference a valid ACL or an ACL with zero ACL entries if the
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
parameter is ACL_TYPE_DEFAULT. If the
|
|
rpm-build |
0a0c83 |
.Va acl
|
|
rpm-build |
0a0c83 |
parameter references an empty ACL, then the
|
|
rpm-build |
0a0c83 |
.Fn acl_set_file
|
|
rpm-build |
0a0c83 |
function removes any default ACL associated with the directory referred to
|
|
rpm-build |
0a0c83 |
by the
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
parameter.
|
|
rpm-build |
0a0c83 |
.Sh RETURN VALUE
|
|
rpm-build |
0a0c83 |
.Rv -std acl_set_file
|
|
rpm-build |
0a0c83 |
.Sh ERRORS
|
|
rpm-build |
0a0c83 |
If any of the following conditions occur, the
|
|
rpm-build |
0a0c83 |
.Fn acl_set_file
|
|
rpm-build |
0a0c83 |
function returns
|
|
rpm-build |
0a0c83 |
.Li -1
|
|
rpm-build |
0a0c83 |
and sets
|
|
rpm-build |
0a0c83 |
.Va errno
|
|
rpm-build |
0a0c83 |
to the corresponding value:
|
|
rpm-build |
0a0c83 |
.Bl -tag -width Er
|
|
rpm-build |
0a0c83 |
.It Bq Er EACCES
|
|
rpm-build |
0a0c83 |
Search permission is denied for a component of the path prefix or the
|
|
rpm-build |
0a0c83 |
object exists and the process does not have appropriate access rights.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
Argument
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
specifies a type of ACL that cannot be associated with
|
|
rpm-build |
0a0c83 |
.Va path_p .
|
|
rpm-build |
0a0c83 |
.It Bq Er EINVAL
|
|
rpm-build |
0a0c83 |
The argument
|
|
rpm-build |
0a0c83 |
.Va acl
|
|
rpm-build |
0a0c83 |
does not point to a valid ACL.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The ACL has more entries than the file referred to by
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
can obtain.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
parameter is not ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
parameter is ACL_TYPE_DEFAULT, but the file referred to by
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
is not a directory.
|
|
rpm-build |
0a0c83 |
.It Bq Er ENAMETOOLONG
|
|
rpm-build |
0a0c83 |
The length of the argument
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
is too long.
|
|
rpm-build |
0a0c83 |
.It Bq Er ENOENT
|
|
rpm-build |
0a0c83 |
The named object does not exist or the argument
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
points to an empty string.
|
|
rpm-build |
0a0c83 |
.It Bq Er ENOSPC
|
|
rpm-build |
0a0c83 |
The directory or file system that would contain the new ACL cannot be extended or the file system is out of file allocation resources.
|
|
rpm-build |
0a0c83 |
.It Bq Er ENOTDIR
|
|
rpm-build |
0a0c83 |
A component of the path prefix is not a directory.
|
|
rpm-build |
0a0c83 |
.It Bq Er ENOTSUP
|
|
rpm-build |
0a0c83 |
The file identified by
|
|
rpm-build |
0a0c83 |
.Va path_p
|
|
rpm-build |
0a0c83 |
cannot be associated with the ACL because the file system on which the file
|
|
rpm-build |
0a0c83 |
is located does not support this.
|
|
rpm-build |
0a0c83 |
.It Bq Er EPERM
|
|
rpm-build |
0a0c83 |
The process does not have appropriate privilege to perform the operation to set the ACL.
|
|
rpm-build |
0a0c83 |
.It Bq Er EROFS
|
|
rpm-build |
0a0c83 |
This function requires modification of a file system which is currently read-only.
|
|
rpm-build |
0a0c83 |
.El
|
|
rpm-build |
0a0c83 |
.Sh STANDARDS
|
|
rpm-build |
0a0c83 |
IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The behavior of
|
|
rpm-build |
0a0c83 |
.Fn acl_set_file
|
|
rpm-build |
0a0c83 |
when the
|
|
rpm-build |
0a0c83 |
.Va acl
|
|
rpm-build |
0a0c83 |
parameter refers to an empty ACL and the
|
|
rpm-build |
0a0c83 |
.Va type
|
|
rpm-build |
0a0c83 |
parameter is ACL_TYPE_DEFAULT is an extension in the Linux implementation, in order that all values returned by
|
|
rpm-build |
0a0c83 |
.Fn acl_get_file
|
|
rpm-build |
0a0c83 |
can be passed to
|
|
rpm-build |
0a0c83 |
.Fn acl_set_file .
|
|
rpm-build |
0a0c83 |
The POSIX.1e function for removing a default ACL is
|
|
rpm-build |
0a0c83 |
.Fn acl_delete_def_file .
|
|
rpm-build |
0a0c83 |
.Sh SEE ALSO
|
|
rpm-build |
0a0c83 |
.Xr acl_delete_def_file 3 ,
|
|
rpm-build |
0a0c83 |
.Xr acl_get_file 3 ,
|
|
rpm-build |
0a0c83 |
.Xr acl_set_fd 3 ,
|
|
rpm-build |
0a0c83 |
.Xr acl_valid 3 ,
|
|
rpm-build |
0a0c83 |
.Xr acl 5
|
|
rpm-build |
0a0c83 |
.Sh AUTHOR
|
|
rpm-build |
0a0c83 |
Derived from the FreeBSD manual pages written by
|
|
rpm-build |
0a0c83 |
.An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
|
|
rpm-build |
0a0c83 |
and adapted for Linux by
|
|
rpm-build |
0a0c83 |
.An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .
|