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 subroutine, acl_get subroutine, acl_set subroutine, chacl subroutine, chmod subroutine, stat subroutine, statacl subroutine.
The aclget command, aclput command, chmod command.
List of Security and Auditing Subroutines and Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.