WikiPendium

(beta)

Fchown()

WikiPendium :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-18-119-107-96.us-east-2.compute.amazonaws.com

Fchown()


LONG Fchown( name, uid, gid )

char *name;
WORD uid, gid;

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 modified 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()?

Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]