BGLinux Faculty Documentation

Creating class directories

A custom program, called class, is available on BGLinux for the purpose of linking student's personal directories with a class directory structure. To create a class directory, execute the following command:

class -new directoryname instructor

Consider this example: class -new cs123 smith

For this example, the class directory will be called cs123. Username smith will have instructor access to the class. The instructor doesn't need to join the class unless he/she want to have a personal class directory.

The directory is retained until the end of the semester. There is a class library link in each student's subdirectory. Instructors have read and update access to the library, and the students will have read-only access. Instructors also have read access to each student's individual class directory.

If more than one person is to have instructor access, additional instructors can be added by the Technology Support Center (2-0999 or ITS Chat)

Joining the class

Each student in your class needs to execute the following command to create a class directory and to have access to the class library:

class -join directoryname

The student uses the directory name that you specified when the class directory was created. Students should be told to do all work for the class in the class directory. You will have access to view all files in the student's class directory, but you should not attempt to edit files or add files in the student's directory. The student will not be able to edit or delete these files if you do so. (This problem can be fixed, though, with the technique described in the following section.)

Fixing permissions

You are supposed to have read access to any file found in the student's class directory or in any subdirectory of the student's class directory. However, students who use certain visual editors on bglinux will inadvertently create a file that you can't read. There are also other ways that protections can get set inappropriately. You can run a utility to fix any file protection problems. This is the command to use:

class -fix directoryname

Adding files to the class library

When you want to share a file with a student, you should copy it to your class library (using the cp command). Do not use the mv command to put things in the library or the file might not have the proper group setting. If you find that some file doesn't have proper protection settings, you can use the following commands to reset protections.

Use the following command to set the protection for a text file:

chmod 6640 filename

Use the following command to set the protection for an executable file or shell script:

chmod 775 filename

The fix option will also fix the permissions for all files in the class library:

class -fix directoryname

Updated: 01/23/2023 03:26PM