Spring2011.SubmitManPage History

Hide minor edits - Show changes to markup

Added lines 1-724:
 SUBMIT(1)                                                         SUBMIT(1)




 NAME
      submit - electronic submission of labs to class graders

 SYNOPSIS
      submit class lab file ...

 DESCRIPTION
      Submit expects the class name (eg. cis212), lab name (eg. lab2), and a
      list of files that are to be submitted. The list of files may include
      directories as well. Various checks are made on the submitter,
      available disk space, etc and appropriate, self explanatory error
      messages are displayed. The grader and submitter are sent mail telling
      what was submitted or what error occurred that prevented submission.
      This program is intended to be a simple command line interface. If a
      pretty user interface is desired, a wrapper program or script could
      easily be written that would handle all the user interface stuff and
      then call submit.

      PLEASE NOTE:  This program submits all of the files at once, not one
      at a time, previous submissions for a given lab are completely
      removed.  Or put another way; each time the submit command is issued
      for a given lab, ALL of the previously submitted files are clobbered.

      That means that

           submit cis781 lab1 lab1.c
           submit cis781 lab1 lab1
           submit cis781 lab1 makefile

      will result in ONLY 'makefile' remaining in the lab1 submission

      You should do the following:

           submit cis781 lab1 lab1.c lab1 makefile
           or
           submit cis781 lab1 lab1_dir

      where 'lab1_dir' is a directory containing all of the lab1 files to be
      submitted.

           or best of all (for both student and grader) is:

           cd lab1_dir
           submit cis781 lab1 .

      Submit will immediately print submission information to the submitter.

 EXAMPLE
      submit cis212 lab1 *.c Makefile





 Ohio State University              - 1 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




      jones you have submitted lab1 for group a
      for cis212 at Wed Jul 15 11:14:27 EDT 1992
      The following files have been submitted to smith:

      -rwxr-x---  1 jones    cis123       44 Jul 15 11:12 Makefile
      -rw-r-----  1 jones    cis123      288 Jul 13 10:06 lab1.c

 ERRORS
      Errors may occur at several places in the program and depending on
      when an error occurs mail will be sent to different people.  If the
      correct grader is known and an error occurs, mail will be sent to the
      submitter and the grader being submitted to. Should the error occur in
      such a way as to prevent the determination of the correct grader (for
      instance the submitter is not in any of the grader control files) mail
      will be sent to the submitter and all the graders for the specified
      class. If the class is not valid, then no graders can be determined
      and the submitter is the only one who will receive a mail message. In
      any case the submitter will receive the error mail message as well as
      see the immediate error message that is printed during the program
      run.  Every attempt is made to make sure that the correct grader (at
      least) is aware of the problem that occurred so that they can take any
      corrective action that is appropriate. Ultimately though, the student
      submitting must take responsibility for getting his or her lab
      submitted in time.

      Below is a list of all the error messages and a short description of
      what the problem might be and how to correct it.

           ERROR (1) :  Cannot change uid to 0

           System level error that should be brought to the
           attention of the CIS operators.

           ERROR (2) :  Cannot change gid to %d

           System level error that should be brought to the
           attention of the CIS operators.

           ERROR (3) :  Cannot change uid to %d

           System level error that should be brought to the
           attention of the CIS operators.

           ERROR (4) :  %s is an unreadable directory

           Submitter error.  This error indicates that one of the
           submitter's directories is not readable by his or her
           self.  The submitter should change the mode on the
           directory.

           ERROR (5) :  Can't stat %s



 Ohio State University              - 2 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




           Submitter error.  This error indicates that one of the
           submitter's files is not readable by his or her self.
           The submitter should change the mode on the directory or
           if its a symlink, make sure it points at a real file.

           ERROR (6) :  Impossible error

           This may be temporary, try submitting again before giving
           up.  This should never happen.  Tell the operators if it
           does.

           ERROR (7) :  File d

           Submitter error.  The submitter has tried to submit a
           file larger than the grader wants to allow.  Contact the
           grader about setting this value higher.

           ERROR (8) :  Cannot open %s

           Submitter error.  This error indicates that one of the
           submitter's files is not readable by his or her self.
           The submitter should change the mode on the directory or
           if its a symlink, make sure it points at a real file.

           ERROR (9) :  Unable to write file to %s

           Grader error.  This error indicates that one of the
           grader's files is not writable by his or her self.  The
           grader should change the mode on the file or report this
           problem to the operators.

           ERROR (10) :  Error reading %s file

           This may be temporary, try submitting again before giving
           up.  Read failure during the copy from the submitter area
           to the grader area.  At this point the error is most
           likely from an NFS timeout.

           ERROR (11) :  Error writing %s file

           This may be temporary, try submitting again before giving
           up.  Write failure during the copy from the submitter
           area to the grader area.  At this point the error is most
           likely from an NFS timeout.

           ERROR (12) :  Cannot close %s

           This may be temporary, try submitting again before giving
           up.  Close failure during the copy from the submitter
           area to the grader area.  At this point the error is most
           likely from an NFS timeout on the submitter's file during



 Ohio State University              - 3 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




           close.

           ERROR (13) :  Cannot close %s

           This may be temporary, try submitting again before giving
           up.  Write failure during the copy from the submitter
           area to the grader area.  At this point the error is most
           likely from an NFS timeout on the grader's file during
           close.

           ERROR (14) :  Can't make directory %s

           This may be temporary, try submitting again before giving
           up.  Failure to make a directory in the grader's area.
           The directory may already exist or there may be a
           temporary system problem.

           ERROR (15) :  %s is an unreadable directory

           Submitter error.  This error indicates that one of the
           submitter's directories is not readable by his or her
           self.  The submitter should change the mode on the
           directory.

           ERROR (16) :  Can't stat %s during copy

           Submitter error.  This error indicates that one of the
           submitter's files is not readable by his or her self.
           The submitter should change the mode on the directory or
           if its a symlink, make sure it points at a real file..

           ERROR (17) :  Unknown passwd entry for user %s

           This may be temporary, try submitting again before giving
           up.  The grader can't be found in the password file.
           This is probably temporary.  If it continues please tell
           the operators.

           ERROR (18) :  Can't stat the grader control file %s

           The grader has most likely not created the submit control
           file.  The grader must do this before anyone can submit.

           ERROR (19) :  Grader file %s is not a regular file

           The grader control file must be a regular file (ie.  not
           a symlink).  The grader must fix this before anyone can
           submit.

           ERROR (20) :  Grader file %s is not owned by the grader




 Ohio State University              - 4 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




           The grader must fix this before anyone can submit.

           ERROR (21) :  Grader file %s is writable by others

           The grader must fix this before anyone can submit.

           ERROR (22) :  Can't open the grader control file %s

           The grader must fix this before anyone can submit.

           ERROR (23) :  %s is not a valid labname

           The lab name that the submitter has supplied is bogus.
           If the lab name is really valid the grader must fix
           his/her grader control file to include this lab name as a
           valid one.

           ERROR (24) :  Usage:  %s class labname files

           The submit program has been run with too few arguments.

           ERROR (25) :  The class name is too long - %d characters

           This probably means that the command line is really
           garbage.

           ERROR (26) :  The lab name is too long - %d characters

           This probably means that the command line is really
           garbage.

           ERROR (27) :  User %d not found in password file.

           This may be temporary, try submitting again before giving
           up.  The submitter can't be found in the password file.
           This is probably temporary.  If it continues please tell
           the operators.

           ERROR (28) :  Can't stat the class file %s

           This is a system error that must be fixed by the
           operators.

           ERROR (29) :  %s is not a regular file

           This is a system error that must be fixed by the
           operators.

           ERROR (30) :  %s is not owned by root

           This is a system error that must be fixed by the



 Ohio State University              - 5 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




           operators.

           ERROR (31) :  %s is writable by others

           This is a system error that must be fixed by the
           operators.

           ERROR (32) :  Can't open the class file %s

           This is a system error that must be fixed by the
           operators.

           ERROR (33) :  Garbled entry for %s

           This is a system error that must be fixed by the
           operators.

           ERROR (34) :  No entry for student s

           None of the valid graders for this class have the
           submitter's name in their control files.  The student
           should get in touch with their grader to get their name
           added.

           ERROR (35) :  I don't know what group %s is

           This is a system error that must be fixed by the
           operators.

           ERROR (36) :  Could not do statfs on grading filesystem
           %s

           This is a system error that must be fixed by the
           operators.

           ERROR (37) :  You can't use ..  in a pathname

           The submitter has tried to reference files and
           directories above the point that they are cd'ed into.
           Backward references are not permitted.

           ERROR (38) :  Error reading file %s in the submitter's area

              This error can occurr when the user does not specify the correct
              file name(s) for their submission.  Check to make sure that the
              correct filenames were specified on the command line.

              If the problem isn't the filenames, it may be a temporary system
              problem, try submitting again before giving up.  Read failure while
              totaling the file sizes in the submitter's area is another cause.
              At this point the error is most likely from an NFS timeout.



 Ohio State University              - 6 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




           ERROR (39) :  Error reading file %s in the grader's area

           This may be temporary, try submitting again before giving
           up.  Read failure while totaling the file sizes in the
           grader's area.  At this point the error is most likely
           from an NFS timeout.

           ERROR (40) :  You are not allowed to submit more than %d
           bytes.  You are trying to submit %d bytes.

           Are you sure your not submitting some junk files as well.
           A core file takes up lots of space.  If you REALLY need
           to submit this much, please talk with your grader.

           ERROR (41) :  Not enough space on disk to submit files.
           Please tell the operators that the filesystem containing
           %s is nearly full.

           The submitter is not permitted to submit to a filesystem
           that is very nearly full.  Please see that your grader
           and the operators know about this problem.

           ERROR (42) :  Can't fork process

           This may be temporary, try submitting again before giving
           up.  This is a system error that must be fixed by the
           operators.

           ERROR (43) :  Can't exec rm process

           This may be temporary, try submitting again before giving
           up.  This is a system error that must be fixed by the
           operators.

           ERROR (44) :  Error in wait

           This may be temporary, try submitting again before giving
           up.  This is a system error that must be fixed by the
           operators.

           ERROR (45) :  Can't make directory %s

           This may be temporary, try submitting again before giving
           up.  This is a system error that must be fixed by the
           operators.

           ERROR (46) :  Error copying file %s

           This may be temporary, try submitting again before giving
           up.  Write failure during the copy from the submitter
           area to the grader area.  At this point the error is most



 Ohio State University              - 7 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




           likely from an NFS
           timeout.

           ERROR (47) :  Could not sanitize environment

           This may be temporary, try submitting again before giving
           up.  This is a system error that must be fixed by the
           operators.

           ERROR (48) :  Can't exec raisedir script

           This may be temporary, try submitting again before giving
           up.  This is a system error that must be fixed by the
           operators.

           ERROR (49) : Class %s is unknown - the following are valid:

           The class name given by the user does not exist - choose from
           the given options.


 RETURN VALUE
      The return code from submit will be zero if it successfully completes,
      non zero otherwise.

 SECURITY
      Every attempt has been made to make this a very secure and cautious
      program.  Submitted programs are moved directly from the submitter's
      directory to the grader's directory. Special permissions are stripped
      off of submitted files and control files are checked during every run
      and must be secure.  There is no way for any student to access other
      submitted student files.  Time stamps on the submitted files can not
      be spoofed, so submission times are correct. Messages saying that the
      files have been submitted are printed only after all the files have
      been successfully copied. All system errors (including NFS Timeouts)
      are detected and error messages sent accordingly.  Access to the
      grading directory is strictly controlled and can not be used to remove
      or modify the wrong files.

 INTERNAL DETAILS
      Submit is controlled by two different file types, the class control
      file, /usr/local/config/classlist and a variable number of grader
      control files with a name in the format .submit_ (e.g.
      .submit_cis212).  The grader files are stored in the root of the
      grader's grading directory.

      Below is an example of the classlist file format.

      #
      # classlist format:
      # class grader group grading-dir max-submission high-water-%



 Ohio State University              - 8 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




      #
      cis212 keith cis212 /n/shape/0/keith 1000000 98
      cis313 keith cis313 /n/shape/0/keith 1000000 98
      cis212 subgdr1 cis212 /n/shell/0/subgdr1 1000000 98
      cis313 subgdr1 cis313 /n/shell/0/subgdr1 1000000 98
      cis212 hptest cis212 /n/shape/0/hptest 1000000 98
      cis313 hptest cis313 /n/shape/0/hptest 1000000 98

      Lets look at these fields one by one.

      Field 1 is the class that the submitter enters in arg 1. There may be
      any number of lines starting with a particular class. Each line with
      the same class represents a unique grader. Field 1 must start in the
      first column (i.e. no leading spaces).

      Field 2 is the user id for the grader, exactly like it would appear in
      the password file.

      Field 3 is the group id for the grading group. This group is intended
      to provide a simple access mechanism for multiple people to run and
      review the submitted work. This will most likely be a group that both
      a teaching faculty member will be in along with the grader.

      Field 4 is the grading directory. This directory does not need to have
      anything to do with the grader's home directory. Indeed, the machine
      with the grader's home directory doesn't even need to be up. The
      actual location of the submitted files is generated in the following
      manner.  The example "submit cis313 lab4 lab4.c makefile" by user Joe
      would result in the creation of a ./grader/cis313/lab4/joe directory
      under the directory in this field containing files lab4.c and
      makefile.  These files and directories are owned by the grader.  Files
      that had execute permission set in the submitter's directory have them
      set on in the graders directory.  The directory format is obvious for
      the most part.  Talks with graders indicated that the users directory
      (ie.  joe) should be a subdirectory of the lab directory (ie. lab4) to
      simplify grading all of a single lab, rather than organizing the lab
      directories under the user (ie. joe/lab4).  If the files submitted are
      in fact directories themselves they are copied recursively.  This is
      useful in the case of subdirectories created for different machine
      types.  The cis781 makefile creates an hp300 or sun4 subdirectory for
      .o and executables.  Hence the need and use for the submit program to
      handle directories.

      Field 5 is the maximum submission size. The total submission (all the
      files) may not exceed this value.

      Field 6 is an integer percentage indicating the maximum disk space
      utilization of the grader's destination filesystem. If the filesystem
      containing the grader's grading directory is more that this value (in
      the example 98%) full the submission is not permitted.




 Ohio State University              - 9 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




      These last two arguments permit the facilities staff to have some
      control on whether the destination filesystem becomes filled and
      should prevent serious problems with disks filling up.

      The fields may be tab or space separated. Lines beginning with the #
      sign are comments and are ignored.

      The operations staff has administrative control over this file.  The
      classlist file must be owned by root, be a regular file (not a link),
      and must be writable only by root.  The operations staff has
      administrative control over this file.

      As mentioned above the graders have their own control file that is
      described below.

      #
      # .submit_cis212
      #
      filemax 10000000
      users student1
      users student2 student3
      users student4
      group one student8 student9 student10
      group two student5 student6 student7
      group three student11 student13 student14
      group four student15 student16
      labnames lab1 lab2 lab3
      labnames lab4 lab5 lab6

      There are four keywords that are currently understood: filemax, users,
      group, and labnames.

      Filemax is the maximum size that any individual file is allowed to be
      submitted. This can be used to prevent ridiculously large files, such
      as core files, from being copied.

      Users is a list of the valid user ids that may submit to this
      particular grader. There can be multiple users lines in any order.

      Group is a group name followed by a list of user ids belonging to that
      group.  This is to facilitate the grading of classes which involve
      group projects as opposed to single student projects.  If the submit
      program encounters the student's user id in a group statement before
      it sees the user id in a users statement, the submission will be
      stored under the group name.  Therefore, the ordering of the users and
      group keywords is important.

      Labnames is a list of all the valid labnames for this class and
      grader.  There can be multiple labnames lines in any order.

      The keywords must start in the first column (i.e. no leading spaces).



 Ohio State University             - 10 -      Formatted:  February 16, 1996






 SUBMIT(1)                                                         SUBMIT(1)




      Lines beginning with # signs are comments and are ignored. Fields may
      be tab or space separated. The reserved words, filemax, users, group,
      and labnames must be in lower case only. Lines that do not start with
      these reserved words or # signs will be ignored. The grader file must
      be owned by the grader, be a regular file (not a link), and must be
      writable only by the grader.

 BUGS
      Symbolic links cannot be submitted -- they result in an "impossible
      error"

      There is currently no way to turn off the sub-directory "feature" when
      user's submit absolute pathnames instead of relative ones.

      Changing the ownership of the .submit_XXX file in the submit directory
      causes submissions to be denied.  The program should check to see if
      the owner is in the group before denying submissions.

 SEE ALSO
      ontime(1).


































 Ohio State University             - 11 -      Formatted:  February 16, 1996