Template "D" line          AFS Commands       Template "D" line


NAME

   Template "D" line -- create a directory.


   D <pathname> <mode> <owner> <access list>

DESCRIPTION

   Creates  a  directory  anywhere  in  the  file  system.   It
   intended use  is  to  create  a  subdirectory  in  the  home
   directory defined on the preceding "V" line.

   The  "D"  line  should  appear  after  the  "V"  line if any
   variables  in  it  take  their  values  from  the  "V"  line
   (notably,  $MTPT).   Any number of "D" lines may appear in a
   template.

WARNING

   Using the "D" line to create directories outside AFS  (e.g.,
   in  the  UNIX  file  system of the workstation where the uss
   command is being issued) introduces two complications:

      - The first complication arises if the issuer wishes
        to  set  the <owner> field to something other than
        his or her own user name or UNIX UID.  The default
        owner  of a UNIX file system directory is the user
        who created it (in this case, the  issuer  of  the
        uss  command).    Changing this default, which uss
        will attempt if anything other than  the  issuer's
        name   appears  in  the  <owner>  field,  requires
        issuing the chown command, which in turn  requires
        being the super-user "root".  If the issuer wishes
        to specify an alternate owner, he or she  must  be
        "root"  in the UNIX file system and use the -admin
        flag in  order  to  be  recognized  in  AFS  as  a
        privileged  administrator.  See the description of
        the -admin argument for uss add and uss bulk.

      - The second complication is that it is not possible
        to  associate  an ACL with a non-AFS directory, so
        uss will always  print  a  warning  message  about
        that.    It will create the directory nonetheless,
        and  the  <access  list>  field  must  always   be
        provided.

   The  preferred method for automatic placement of directories
   on the local disk is the  package  program,  which  runs  as
   "root".

ARGUMENTS

   D         should  be  a capital letter and tells the command
             interpreter  that  this  is  a  directory-creation
             instruction.

   pathname  is the full pathname of the directory.

   mode      sets   the  UNIX  mode  bits  for  the  directory.
             Provide a four-digit decimal number in this field,



             such  as  0755  or  0744.    Keep in mind that the
             "user" x bit must be turned on for a directory.

   owner     names the directory's  owner  (in  the  UNIX  file
             system  sense).   If the directory is being placed
             in AFS, the $UID variable should  appear  in  this
             field.   If the directory is being placed into the
             UNIX file system rather than AFS, this field  must
             contain  the  user  name  or  UNIX  UID of the uss
             command's issuer, or  the  account  creation  will
             abort at that point.

   access list
             defines the access control list for the  new  home
             directory.   It   must  be  included  for  non-AFS
             directories, even though it  is  ignored  in  that
             case.  The list may define one or more pairs, each
             consisting of

                - a user name or Protection Database group
                  name

                - the access rights

             separated  by  a space.  See the fs setacl command
             to learn about the access  rights  available  with
             AFS.

             At  the  least, the new user needs to be given all
             access rights.  This could be achieved with

                $USER all

             Unlike the "V" line, there are no default pairs on
             the  ACL  of  a directory created with a "D" line.
             However, as with the "V" line it is  not  possible
             to  grant  any  rights  to  the  issuer of the uss
             command.  As the last step  in  account  creation,
             the  uss command interpreter automatically deletes
             that person from  any  access  control  lists  set
             during the creation process.

EXAMPLE

   The  following creates a public directory in the user's home
   directory, makes  the  user  own  the  directory  and  gives
   him/her all access rights.

       D $MTPT/public 0755 $UID $USER all
