Changes the AIXC ACL type access control information on a file.
Security Library (libc.a)
#include <sys/access.h>
  int acl_chg (Path, How, Mode, Who)
char * Path;
int  How;
int  Mode;
int  Who;
int acl_fchg (FileDescriptor, How, Mode, Who)
int  FileDescriptor;
int How;
int Mode;
int Who;
The acl_chg and acl_fchg subroutines modify the AIXC ACL-type-based access control information of a specified file. This call can fail for file system objects with any non-AIXC ACL.
| Item | Description | 
|---|---|
| FileDescriptor | Specifies the file descriptor of an open file. | 
| How |   Specifies how the permissions are to be altered for the affected
entries of the Access Control List (ACL). This parameter takes one
of the following values:  
  | 
| Mode |   Specifies the access modes to be changed. The Mode parameter
is a bit mask containing zero or more of the following values:  
  | 
| Path | Specifies a pointer to the path name of a file. | 
| Who |   Specifies which entries in the ACL are affected. This parameter
takes one of the following values:  
  | 
On successful completion, the acl_chg and acl_fchg subroutines return a value of 0. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
The acl_chg subroutine fails and the access control information for a file remains unchanged if one or more of the following is true:
| Item | Description | 
|---|---|
| EACCES | Search permission is denied on a component of the Path prefix. | 
| EFAULT | The Path parameter points to a location outside of the allocated address space of the process. | 
| ELOOP | Too many symbolic links were encountered in translating the Path parameter. | 
| ENAMETOOLONG | A component of the Path parameter exceeded 255 characters, or the entire Path parameter exceeded 1023 characters. | 
| ENOENT | A component of the Path does not exist or has the disallow truncation attribute (see the ulimit subroutine). | 
| ENOENT | The Path parameter was null. | 
| ENOENT | A symbolic link was named, but the file to which it refers does not exist. | 
| ENOTDIR | A component of the Path prefix is not a directory. | 
| ESTALE | The process' root or current directory is located in a virtual file system that has been unmounted. | 
The acl_fchg subroutine fails and the file permissions remain unchanged if the following is true:
| Item | Description | 
|---|---|
| EBADF | The FileDescriptor value is not valid. | 
The acl_chg or acl_fchg subroutine fails and the access control information for a file remains unchanged if one or more of the following is true:
| Item | Description | 
|---|---|
| EINVAL | The How parameter is not one of ACC_PERMIT, ACC_DENY, or ACC_SPECIFY. | 
| EINVAL | The Who parameter is not ACC_OWNER, ACC_GROUP, ACC_OTHERS, or ACC_ALL. | 
| EROFS | The named file resides on a read-only file system. | 
The acl_chg or acl_fchg subroutine fails and the access control information for a file remains unchanged if one or more of the following is true:
| Item | Description | 
|---|---|
| EIO | An I/O error occurred during the operation. | 
| EPERM | The effective user ID does not match the ID of the owner of the file and the invoker does not have root user authority. | 
If Network File System (NFS) is installed on your system, the acl_chg and acl_fchg subroutines can also fail if the following is true:
| Item | Description | 
|---|---|
| ETIMEDOUT | The connection timed out. |