HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)

f
fstat(2) fstat(2)
write(2)). The touch command (see touch(1) can be used to explicitly control the
times of a file.
st_mode The value returned in this field is the bit-wise inclusive OR of a value indicating the
file’s type, attribute bits, and a value summarizing its access permission. See
mknod(2). For ordinary users, the least significant nine bits consist of the file’s per-
mission bits modified to reflect the access granted or denied to the caller by optional
entries in the file’s access control list. For users with appropriate privileges the least
significant nine bits are the file’s access permission bits. In addition, the
S_IXUSR
(execute by owner) mode bit is set if the following conditions are met:
The file is a regular file,
No permission execute bits are set, and
An execute bit is set in one or more of the files optional access control list entries.
The write bit is not cleared for a file on a read-only file system or a shared-text pro-
gram file that is being executed. However,
getaccess() clears this bit under these
conditions (see getaccess(2).
ERRORS
[EFAULT] buf or path points to an invalid address. The reliable detection of this error is
implementation-dependent.
[EOVERFLOW]
The file size in bytes or the number of blocks allocated to the file cannot be
represented correctly in the structure pointed to by buf.
NFS
The st_basemode, st_acl and st_aclv fields are zero on files accessed remotely. The st_acl field is applicable
to HFS File Systems only. The st_aclv field is applicable to JFS File Systems only.
WARNINGS
Access Control Lists - HFS and JFS File Systems only
Access control list descriptions in this entry apply only to HFS and JFS file systems on standard HP-UX
operating systems.
DEPENDENCIES
CD-ROM
The st_uid and st_gid fields are set to 1 if they are not specified on the disk for a given file.
AUTHOR
stat() and fstat() were developed by AT&T. lstat() was developed by the University of Califor-
nia, Berkeley.
SEE ALSO
touch(1), acl(2), chmod(2), chown(2), creat(2), fstat64(2), link(2), mknod(2), pipe(2), read(2), rename(2),
setacl(2), sysfs(2), time(2), truncate(2), unlink(2), utime(2), write(2), acl(5), aclv(5), stat(5).
STANDARDS CONFORMANCE
fstat(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
Section 276 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005