Open System Services System Calls Reference Manual (G06.28+)
System Functions (f - i) fchown(2)
The _POSIX_CHOWN_RESTRICTED
feature is ignored for files in the Guardian file system
(that is, for files in /G).
Use From the Guardian Environment
The fchown() function is one of a set of functions that have these effects when the first of them is
called from the Guardian environment:
• Two Guardian file system file numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These file numbers cannot
be closed by calling the Guardian FILE_CLOSE_ procedure.
• The current working directory is assigned from the VOLUME attribute of the Guardian
environment =_DEFAULTS DEFINE.
• The use of static memory by the process increases slightly.
These effects occur only when the first of the set of functions is called. The effects are not cumu-
lative.
RETURN VALUES
Upon successful completion, the fchown() function returns the value 0 (zero). Otherwise, the
value -1 is returned, the owner and group of the file remain unchanged, and errno is set to indi-
cate the error.
ERRORS
If any of these conditions occur, the fchown() function sets errno to the corresponding value:
[EBADF] The file descriptor filedes is not valid.
[EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt.
[EINTR] A signal was caught during execution of the system call.
[EINVAL] The owner or group parameter is out of range.
An attempt was made to change ownership of a Guardian file that is not a disk
file.
[EIO] An input or output error occurred. The device holding the file might be in the
down state, or both processors that provide access to the device might have
failed.
[ENOENT] The program attempted an operation on a file that is open but that has been
unlinked (and the attributes of the file are no longer alterable).
[ENOROOT] One of these conditions exists:
• The root fileset of the local node (fileset 0) is not in the STARTED state.
• The current root fileset for the specified file is unavailable. The OSS
name server for the fileset might have failed.
• The specified file is on a remote HP NonStop node, and communication
with the remote name server has been lost.
[EOSSNOTRUNNING]
The program attempted an operation on an object in the OSS environment while
a required system process was not running.
527186-005 Hewlett-Packard Company 3−7