annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <refentry id="chmod">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
3 <refname>Chmod</refname>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
4 <refpurpose>change access permissions of a file</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
5 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 <funcsynopsis>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
9 <funcsynopsisinfo>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
10 #include &lt;modes.h&gt;
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
11 </funcsynopsisinfo>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
12 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
13 <funcdef><function>chmod</function></funcdef>
472
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
14 <paramdef>char *<parameter>fname</parameter></paramdef>
f0c8d53e5a50 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
15 <paramdef>int <parameter>perm</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
16 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
17 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
18
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
19 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
20
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
21 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
22 <para>
594
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
23 Chmod changes the permission bits associated with a file.
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
24 "Fname" must be a pointer to a file name, and "perm" should
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
25 contain the desired bit pattern,
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
26 </para>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
27 <para>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
28 The allowable bit patterns are defined in the include file as follows:
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
29 </para>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
30 <programlisting>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
31 /* permissions */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
32 #define S_IREAD 0x01 /* owner read */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
33 #define S_IWRITE 0x02 /* owner write */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
34 #define S_IEXEC 0x04 /* owner execute */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
35 #define S_IOREAD 0x08 /* public read */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
36 #define S_IOWRITE 0x10 /* public write */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
37 #define S_IOEXEC 0x20 /* public execute */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
38 #define S_ISHARE 0x40 /* sharable */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
39 #define S_IFDIR 0x80 /* directory */
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
40 </programlisting>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
41 <para>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
42 Only the owner or the super user may change the permissions of
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
43 a file.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
44 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
45 </refsect1>
594
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
46
552
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
47 <refsect1><title>Diagnostics</title>
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
48 <para>
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
49 A successful call returns 0. A -1 is returned if the
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
50 caller is not entitled to change permissions of "fname" cannot
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
51 be found.
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
52 </para>
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
53 </refsect1>
fcb97f0ba24b All diagnostics added.
roug
parents: 472
diff changeset
54
594
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
55 <refsect1><title>See Also</title>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
56 <para>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
57 OS-9 command "attr"
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
58 </para>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
59 </refsect1>
c0da1728ed5b All refentries finished.
roug
parents: 552
diff changeset
60
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
61 </refentry>