Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileFchmod()Fxattr()access permissionsFchown() GEMDOSSyntaxLONG Fchown( name, uid, gid )
char *name;
WORD uid, gid;
Function Fchown() changes a file's ownership.
Opcode 305 (0x131)
Availability Available when a 'MiNT' cookie with a version of at least
0.90 exists.
Parameters name specifies the file whose ownership status you wish to
change. uid sets the new owner and gid sets the new group.
Binding move.w gid,-(sp)
move.w uid,-(sp)
pea name
move.w #$131,-(sp)
trap #1
lea 10(sp),sp
Return Value Fchown() returns 0 if the operation was successful or
a negative GEMDOS error code otherwise.
Caveats Most file systems don't understand the concept of file
ownership (including TOS).
Comments uid may only be modifies if the caller's uid is 0. gid may
only be changed to the group id of a group the caller
belongs to.
See Also Fchmod(), Fxattr(), access permissions