Chapter Contents

Previous

Next
lchown

lchown



Change file or Link Ownership

Portability: UNIX compatible


SYNOPSIS
DESCRIPTION
RETURN VALUE
USAGE NOTES
RELATED FUNCTIONS


SYNOPSIS

#include <unistd.h>
int lchown(const char *pathname,
           uid_t owner, gid_t group);


DESCRIPTION

lchown changes the owner or owning group of an HFS file or symbolic link. It can be used with either regular files or special files such as directories, FIFO files or links. pathname is the name of the file or link, owner is the new owning user id, and group is the new group id. If either owner or group is specified as -1, the owner or group of the file or link is unchanged.

For programs not compiled with the posix option, a style prefix may be required as part of the pathname specification. See "File Naming Conventions" in SAS/C Library Reference, Volume 1, for further information.

Note:   For information on when UNIX System Services permits file ownership to be changed, see the chown function.  [cautionend]


RETURN VALUE

lchown returns 0 if successful, or -1 if unsuccessful.


USAGE NOTES

The lchown function can only be used with MVS 5.2.2 or a later release.


RELATED FUNCTIONS

chown, fchown


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.