Sets the access control information of a file.
#include <sys/access.h>
int acl_put (Path, Access, Free)
char * Path;
char * Access;
int Free;
int acl_fput (FileDescriptor, Access, Free)
int FileDescriptor;
char * Access;
int Free;
The acl_put and acl_fput subroutines set the access control information of a file system object. This information is contained in a buffer returned by a call to the acl_get or acl_fget subroutine. The structure of the data in this buffer is unspecified. However, the entire Access Control List (ACL) for a file cannot exceed one memory page (4096 bytes) in size.
On successful completion, the acl_put and acl_fput subroutines return a value of 0. Otherwise, -1 is returned and the errno global variable is set to indicate the error.
The acl_put subroutine
fails and the access control information for a file remains unchanged if one
or more of the following are true:
The acl_fput subroutine
fails and the file permissions remain unchanged if the following is
true:
EBADF | The FileDescriptor parameter is not a valid file descriptor. |
The acl_put or
acl_fput subroutine fails and the access control information for a
file remains unchanged if one or more of the following are true:
If Network File System (NFS) is
installed on your system, the acl_put and acl_fput
subroutines can also fail if the following is true:
ETIMEDOUT | The connection timed out. |
Access Control: The invoker must have search permission for all components of the Path prefix.
Event | Information |
chacl | Path |
fchacl | FileDescriptor |
These subroutines are part of Base Operating System (BOS) Runtime.
The acl_chg (acl_chg or acl_fchg Subroutine) subroutine, acl_get (acl_get or acl_fget Subroutine) subroutine, acl_set (acl_set or acl_fset Subroutine) subroutine, chacl (chacl or fchacl Subroutine) subroutine, chmod (chmod or fchmod Subroutine) subroutine, stat subroutine, statacl subroutine.
The aclget command, aclput command, chmod command.
List of Security and Auditing Subroutines and Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.