Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/chmod.refentry @ 3220:9ccec98c9897
Updated IDE Driver makefile so it will have place holders for
dsk, dskclean, and dskcopy so that make does not error out when
chaining into the driver tree to build disk images where applicable.
author | David Ladd <drencor-xeen@users.sourceforge.net> |
---|---|
date | Wed, 20 Dec 2017 16:10:50 -0600 |
parents | c0da1728ed5b |
children |
line wrap: on
line source
<refentry id="chmod"> <refnamediv> <refname>Chmod</refname> <refpurpose>change access permissions of a file</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> #include <modes.h> </funcsynopsisinfo> <funcprototype> <funcdef><function>chmod</function></funcdef> <paramdef>char *<parameter>fname</parameter></paramdef> <paramdef>int <parameter>perm</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1><title>Description</title> <para> Chmod changes the permission bits associated with a file. "Fname" must be a pointer to a file name, and "perm" should contain the desired bit pattern, </para> <para> The allowable bit patterns are defined in the include file as follows: </para> <programlisting> /* permissions */ #define S_IREAD 0x01 /* owner read */ #define S_IWRITE 0x02 /* owner write */ #define S_IEXEC 0x04 /* owner execute */ #define S_IOREAD 0x08 /* public read */ #define S_IOWRITE 0x10 /* public write */ #define S_IOEXEC 0x20 /* public execute */ #define S_ISHARE 0x40 /* sharable */ #define S_IFDIR 0x80 /* directory */ </programlisting> <para> Only the owner or the super user may change the permissions of a file. </para> </refsect1> <refsect1><title>Diagnostics</title> <para> A successful call returns 0. A -1 is returned if the caller is not entitled to change permissions of "fname" cannot be found. </para> </refsect1> <refsect1><title>See Also</title> <para> OS-9 command "attr" </para> </refsect1> </refentry>