Files
oldlinux-files/docs/Install-Guide/install-guide-2.2.2/node128.html
2024-02-19 00:23:35 -05:00

69 lines
3.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>3.9.4 Changing permissions</TITLE>
</HEAD>
<BODY>
<meta name="description" value="3.9.4 Changing permissions">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html3374 HREF="node129.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3372 HREF="node124.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3368 HREF="node127.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3376 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3377 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3375 HREF="node129.html">3.10 Managing file links</A>
<B>Up:</B> <A NAME=tex2html3373 HREF="node124.html">3.9 File Permissions</A>
<B> Previous:</B> <A NAME=tex2html3369 HREF="node127.html">3.9.3 Dependencies</A>
<BR> <HR> <P>
<H2><A NAME=SECTION00594000000000000000>3.9.4 Changing permissions</A></H2>
<P>
<A NAME=3251>&#160;</A>
<A NAME=3252>&#160;</A>
<A NAME=3253>&#160;</A>
<A NAME=3288>&#160;</A>
The command <tt>chmod</tt> is used to set the permissions on a file. Only
the owner of a file may change the permissions on that file.
The syntax of <tt>chmod</tt> is:
<P><TT> chmod {a,u,g,o}{+,-}{r,w,x} <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img189.gif"> <P></TT>
<P>
Briefly, you supply one or more of
<b>a</b>ll, <b>u</b>ser, <b>g</b>roup, or <b>o</b>ther. Then you specify
whether you are adding rights (<tt>+</tt>) or taking them away (<tt>-</tt>).
Finally, you specify one or more of
<b>r</b>ead, <b>w</b>rite, and e<b>x</b>ecute. Some examples of legal
commands are:
<P>
<DL COMPACT><DT><tt>chmod a+r stuff</tt>
<DD>
Gives all users read access to the file.
<DT><tt>chmod +r stuff</tt>
<DD>
Same as above---if none of <tt>a</tt>, <tt>u</tt>, <tt>g</tt>, or <tt>o</tt> is
specified, <tt>a</tt> is assumed.
<DT><tt>chmod og-x stuff</tt>
<DD>
Remove execute permission from users other than the owner.
<DT><tt>chmod u+rwx stuff</tt>
<DD>
Allow the owner of the file to read, write, and execute the file.
<DT><tt>chmod o-rwx stuff</tt>
<DD>
Remove read, write, and execute permission from users other than the
owner and users in the file's group.
<P>
</DL>
<P>
<A NAME=3281>&#160;</A>
<A NAME=3282>&#160;</A>
<P>
<BR> <HR><A NAME=tex2html3374 HREF="node129.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3372 HREF="node124.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3368 HREF="node127.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3376 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3377 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3375 HREF="node129.html">3.10 Managing file links</A>
<B>Up:</B> <A NAME=tex2html3373 HREF="node124.html">3.9 File Permissions</A>
<B> Previous:</B> <A NAME=tex2html3369 HREF="node127.html">3.9.3 Dependencies</A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>