openafs/doc/html/UserGuide/auusg011.htm

335 lines
17 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
<HTML><HEAD>
<TITLE>User Guide</TITLE>
<!-- Begin Header Records ========================================== -->
<!-- /tmp/idwt3629/auusg000.scr converted by idb2h R4.2 (359) ID -->
<!-- Workbench Version (AIX) on 2 Oct 2000 at 14:38:44 -->
<META HTTP-EQUIV="updated" CONTENT="Mon, 02 Oct 2000 14:38:42">
<META HTTP-EQUIV="review" CONTENT="Tue, 02 Oct 2001 14:38:42">
<META HTTP-EQUIV="expires" CONTENT="Wed, 02 Oct 2002 14:38:42">
</HEAD><BODY>
<!-- (C) IBM Corporation 2000. All Rights Reserved -->
<BODY bgcolor="ffffff">
<!-- End Header Records ============================================ -->
<A NAME="Top_Of_Page"></A>
<H1>User Guide</H1>
<HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auusg002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auusg010.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auusg012.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auusg013.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P>
<HR><H1><A NAME="HDRWQ86" HREF="auusg002.htm#ToC_167">Appendix B. AFS Command Syntax and Online Help</A></H1>
<A NAME="IDX1144"></A>
<P>The AFS commands available to you are used to authenticate, list AFS
information, protect directories, create and manage groups, and create and
manage ACLs. There are three general types of commands available to all
AFS users: file server commands, protection server commands, and
miscellaneous commands. This chapter discusses the syntax of these AFS
commands, the rules that must be followed when issuing them, and ways of
accessing help relevant to them.
<HR><H2><A NAME="HDRWQ87" HREF="auusg002.htm#ToC_168">AFS Command Syntax</A></H2>
<P>
<A NAME="IDX1145"></A>
Most AFS commands use the following syntax:
<PRE> <B>command_suite operation_code -switch</B> &lt;<VAR>value</VAR>><SUP>[+]</SUP> <B>-flag</B>
</PRE>
<P>The <I>command suite</I> indicates the general type of command and the
server process that performs the command. Regular AFS users have access
to two main command suites and a miscellaneous set of commands:
<A NAME="IDX1146"></A>
<A NAME="IDX1147"></A>
<UL>
<P><LI>The <B>fs</B> command suite is used to issue file server commands that
interact with the File Server process.
<P><LI>The <B>pts</B> command suite is used to issue protection-related
commands.
<P><LI>The miscellaneous commands are not associated with any command
suite.
</UL>
<P>The <I>operation code</I> indicates the action that the command
performs. Miscellaneous commands have operation codes only.
<A NAME="IDX1148"></A>
<P>A command can have multiple <I>options</I>, which can be
<I>arguments</I> or <I>flags</I>:
<UL>
<P><LI>Arguments are used to supply additional information for use by the
command.
<A NAME="IDX1149"></A>
They consist of a paired <I>switch</I> and <I>instance</I>.
<A NAME="IDX1150"></A>
<A NAME="IDX1151"></A>
A switch defines the type of argument and is always preceded by a hyphen;
arguments can take multiple instances if a plus sign (+) appears after the
instance. An instance represents some variable piece of information
that is used by the command. Arguments can be optional or
required.
<P><LI>Flags are used to direct a command to perform in a specific way (for
example, to generate a specific type of output).
<A NAME="IDX1152"></A>
Flags are always preceded by a hyphen and are always optional.
</UL>
<P><H3><A NAME="Header_169" HREF="auusg002.htm#ToC_169">Command Syntax Example</A></H3>
<P>In the following AFS command
<PRE> % <B>fs setacl -dir $HOME -acl pat all terry none -negative</B>
</PRE>
<UL>
<P><LI><B>fs</B> is the command suite.
<P><LI><B>setacl</B> is the <I>operation code</I>, which directs the File
Server process to set an access control list.
<P><LI><B>-dir $HOME</B> and <B>-acl pat all terry none</B> are
<I>arguments</I>.
<UL>
<P><LI><B>-dir</B> and <B>-acl</B> are switches; <B>-dir</B>
indicates the name of the directory on which to set the ACL, and
<B>-acl</B> defines the entries to set on it.
<P><LI><B>$HOME</B> and <B>pat all terry none</B> are
<I>instances</I> of the arguments. <B>$HOME</B> defines a
specific directory for the directory argument. The <B>-acl</B>
argument has two instances specifying two ACL entries: <B>pat
all</B> and <B>terry none</B>.
</UL>
<P><LI><B>-negative</B> is a flag; it directs the command to put the
access list entries on the negative rather than the normal permissions
list.
</UL>
<HR><H2><A NAME="HDRWQ88" HREF="auusg002.htm#ToC_170">Rules for Using AFS Commands</A></H2>
<P>This section describes the rules to follow when using AFS
commands.
<P><H3><A NAME="Header_171" HREF="auusg002.htm#ToC_171">Spaces and Lines</A></H3>
<P>Separate each command element (command suite, operation code, switches,
instances, and flags) with a space. Multiple instances of an argument
are also separated by a space.
<P>Type all AFS commands on one line, followed by a carriage return.
Some commands in this document appear on more than one line, but that is for
legibility only.
<P><H3><A NAME="Header_172" HREF="auusg002.htm#ToC_172">Abbreviations and Aliases for Operation Codes</A></H3>
<A NAME="IDX1153"></A>
<P>You can type operation codes in one of three ways:
<UL>
<P><LI>You can type the operation code in full.
<P><LI>You can abbreviate the operation code to the shortest form that
distinguishes it from the other operation codes in its command suite.
<P><LI>You can use the alias for the operation code, if one exists.
</UL>
<P>For example, the <B>fs listacl</B> command can be issued as
follows:
<UL>
<P><LI><B>fs listacl</B> (full command)
<P><LI><B>fs lista</B> (abbreviation)
<P><LI><B>fs la</B> (alias)
</UL>
<P>The <I>IBM AFS Administration Reference</I> provides information on the
full and abbreviated command syntax as well as any aliases for all of the
commands discussed in this guide.
<P><H3><A NAME="Header_173" HREF="auusg002.htm#ToC_173">Omitting Argument Switches</A></H3>
<A NAME="IDX1154"></A>
<P>You can omit an argument's switch if the command takes only one
argument, or if the following conditions are met.
<UL>
<P><LI>All of the command's required arguments appear in the order
prescribed by the syntax statement.
<P><LI>No switches are used on any arguments, even if they are in the correct
order.
<P><LI>There is only one value for each argument. The important exception
to this condition is if the final required argument accepts multiple
values; in this case, it is acceptable to provide multiple values without
providing the switch.
</UL>
<P>For example, the following two commands are equivalent:
<PRE> % <B>fs setacl -dir /afs/abc.com/usr/terry/private -acl pat rl</B>
% <B>fs setacl /afs/abc.com/usr/terry/private pat rl</B>
</PRE>
<P>However, the following is not an acceptable short form because the
arguments are not in the prescribed order:
<PRE> % <B>fs setacl -acl pat rl /afs/abc.com/usr/terry/private</B>
</PRE>
<P><H3><A NAME="Header_174" HREF="auusg002.htm#ToC_174">Shortening Switches and Flags</A></H3>
<P>
<A NAME="IDX1155"></A>
If you are required to use a switch, or if you decide to use a flag, you can
often shorten the name of that switch or flag provided that the shortened form
still distinguishes it from the command's other flags and
switches.
<P>For example, when you issue the <B>fs setacl</B> command, you can
abbreviate all of the switches and flags of the command to their initial
letter because they all begin with a different letter. However, when
you issue the <B>knfs</B> command, the <B>-host</B> argument and
<B>-help</B> flag both begin with the letter <B>h</B>, so the shortest
unambiguous abbreviations are <B>-ho</B> and <B>-he</B>
respectively.
<P><H3><A NAME="Header_175" HREF="auusg002.htm#ToC_175">Shortening Directory References</A></H3>
<P>
<A NAME="IDX1156"></A>
Most AFS command arguments that require directory or pathnames instances
accept one or more of the following short forms:
<UL>
<P><LI>A single period (<B>.</B>) indicates the current working
directory.
<P><LI>Two periods (<B>..</B>) indicate the parent directory of
the current working directory.
<P><LI>The $HOME environment variable indicates the issuer's home
directory.
</UL>
<P>For example, if the user <B>terry</B> wants to grant <B>r</B>
(<B>read</B>) and <B>l</B> (<B>lookup</B>) permissions on his home
directory to his manager <B>pat</B>, <B>terry</B> can issue the
following command.
<PRE> % <B>fs setacl -dir $HOME -acl pat rl</B>
</PRE>
<P>If the current working directory is <B>terry</B>'s home directory,
he can issue the following command.
<PRE> % <B>fs setacl -dir . -acl pat rl</B>
</PRE>
<P>Both of the previous examples are acceptable short forms for the following
command:
<PRE> % <B>fs setacl -dir /afs/abc.com/usr/terry -acl pat rl</B>
</PRE>
<HR><H2><A NAME="Header_176" HREF="auusg002.htm#ToC_176">Commonly Used fs and pts Commands</A></H2>
<P>This section provides additional information on the commonly used AFS
<B>fs</B> and<B> pts</B> commands. For more detailed
information, see the <I>IBM AFS Administration Reference</I>.
<P><H3><A NAME="Header_177" HREF="auusg002.htm#ToC_177">About the fs Commands</A></H3>
<A NAME="IDX1157"></A>
<P>Some <B>fs</B> commands extend UNIX file system semantics by invoking
file-related functions that UNIX does not provide (setting access control
lists, for example). Other <B>fs</B> commands help you control the
performance of the Cache Manager running on your local client machine.
<A NAME="IDX1158"></A>
<A NAME="IDX1159"></A>
<P>All <B>fs</B> commands accept the optional <B>-help</B>
flag. It has the same function as the <B>fs help</B> command:
it prints a command's online help message on the screen. Do not
provide other options at the same time as this flag. It overrides them,
and the only effect of issuing the command is to display the help
message.
<A NAME="IDX1160"></A>
<P>The privilege required for issuing <B>fs</B> commands varies.
The necessary privileges for the <B>fs</B> commands described in this
guide include the following:
<UL>
<P><LI>Having certain permissions on a directory's access control
list. For example, creating and removing mount points requires
<B>a</B> (<B>administer</B>), <B>i</B> (<B>insert</B>), and
<B>d</B> (<B>delete</B>) permissions for the directory in which the
mount point resides.
<P><LI>Belonging to the <B>system:administrators</B> group (see <A HREF="auusg007.htm#HDRWQ50">Using the System Groups on ACLs</A>).
<P><LI>No privilege. Many <B>fs</B> commands simply list information
and so do not require any special privilege.
</UL>
<P><H3><A NAME="Header_178" HREF="auusg002.htm#ToC_178">About the pts Commands</A></H3>
<A NAME="IDX1161"></A>
<A NAME="IDX1162"></A>
<P>The <B>pts</B> command suite is the interface through which you can
create protection groups and add members to them. System administrators
who belong to a special system group called
<B>system:administrators</B> group can manipulate any group, and
also create the user and machine entries that can belong to groups.
Users who do not belong to the <B>system:administrators</B> group
can always list the information associated with the group entries they own, as
well as their own user entries. Depending on the setting of an
entry's privacy flags, regular users can sometimes access and manipulate
group entries in certain ways.
<P>All <B>pts</B> commands accept optional arguments and flags.
They are listed in the command descriptions in the <I>IBM AFS Administration
Reference</I> and are described here in detail:
<DL>
<A NAME="IDX1163"></A>
<P><DT><B>[-cell &lt;<VAR>cell name</VAR>>]
</B><DD>This argument indicates that the command runs in the indicated
cell. The issuer can abbreviate the <VAR>cell name</VAR> value to the
shortest form that distinguishes it from the other cells listed in the
<B>/usr/vice/etc/CellServDB</B> file on the client machine on which the
command is issued. By default, commands are executed in the local cell
as defined
<UL>
<P><LI>First, by the value of the environment variable AFSCELL. (This
variable is normally not defined by default. If you are working in
another, nonlocal cell for an extended period of time, you can set the
variable to the name of that cell.)
<P><LI>Second, in the <B>/usr/vice/etc/ThisCell</B> file on the client
machine on which the command is issued.
</UL>
</DL>
<DL>
<P><DT><B>[-force]
</B><DD>This flag directs the <B>pts</B> command interpreter to continue
executing the command, if possible, even if it encounters problems during the
command's execution.
<A NAME="IDX1164"></A>
The command interpreter performs as much of the requested operation as
possible, rather than halting if it encounters a problem. The command
interpreter reports any errors it encounters during the command's
execution. This flag is especially useful if you provide many instances
for an argument; if one of the instances is invalid, the command reports
the error and proceeds with the remaining arguments.
</DL>
<DL>
<P><DT><B>[-help]
<A NAME="IDX1165"></A>
<A NAME="IDX1166"></A>
</B><DD>This flag has the same function as the <B>pts help</B> command:
it prints the command's online help message on the screen. Do not
provide other options at the same time as this flag. It overrides them,
and the only effect of issuing the command is to display the help
message.
</DL>
<HR><H2><A NAME="HDRWQ89" HREF="auusg002.htm#ToC_179">Getting Help in AFS</A></H2>
<A NAME="IDX1167"></A>
<A NAME="IDX1168"></A>
<P>AFS online help consists of basic syntax messages. The AFS
distribution also includes help in HTML format which your system administrator
can make available to you.
<P><H3><A NAME="Header_180" HREF="auusg002.htm#ToC_180">Displaying Command Syntax and Aliases</A></H3>
<A NAME="IDX1169"></A>
<A NAME="IDX1170"></A>
<A NAME="IDX1171"></A>
<P>To display a brief description of a command, its syntax statement, and
alias if any, use the <B>help</B> operation code. For example, to
display the online help entry for the <B>fs listacl</B> command, enter the
following command:
<PRE> % <B>fs help listacl</B>
fs listacl: list access control list
aliases: la
Usage: fs listacl [-path &lt;dir/file path>+] [-id] [-if] [-help]
</PRE>
<P>To display the syntax statement only, use the <B>-help</B> flag, which
is available on most AFS commands. For example, to display the syntax
statement for the <B>fs setacl</B> command, enter the following
command:
<PRE> % <B>fs setacl -help</B>
Usage: fs setacl -dir &lt;directory>+ -acl &lt;access list entries>+ [-clear] [-negative]
[-id] [-if] [-help]
</PRE>
<P><H3><A NAME="Header_181" HREF="auusg002.htm#ToC_181">Displaying Operation Code Descriptions</A></H3>
<P>To display a short description of all of a command suite's
operation codes, issue the <B>help</B> operation code without any other
arguments. For example, the <B>fs help</B> command displays a short
description of every operation code in the <B>fs</B> command suite.
<A NAME="IDX1172"></A>
<P>To display a list of the commands in a command suite that concern a certain
type of object, provide a relevant keyword argument to the <B>apropos</B>
operation code. For example, if you want to set an ACL but cannot
remember which <B>fs</B> command to use, issue the following
command:
<PRE> % <B>fs apropos set</B>
setacl: set access control list
setcachesize: set cache size
setcell: set cell status
setclientaddrs: set client network interface addresses
setquota: set volume quota
setserverprefs: set file server ranks
setvol: set volume status
sysname: get/set sysname (i.e. @sys) value
</PRE>
<P>The following message indicates that there are no commands whose names or
descriptions include the keyword string you have provided:
<PRE> Sorry, no commands found
</PRE>
<TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">If the keyword you provide has spaces in it, enclose it in double quotes
(<B>" "</B>).
</TD></TR></TABLE>
<HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auusg002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auusg010.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auusg012.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auusg013.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P>
<!-- Begin Footer Records ========================================== -->
<P><HR><B>
<br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A> All Rights Reserved
</B>
<!-- End Footer Records ============================================ -->
<A NAME="Bot_Of_Page"></A>
</BODY></HTML>