Quick and easy instructions on how change permission and ownership of files and directories so they are readonly for a single user account.

For details on the chmod and chown commmands. do, 'man chomd' and 'man chown'.

Ownership and permission for directories don't need to be changed. These can stay as 755 (rwx r-x r-x), owned by the instrument account.

For files, you want to change permission to be 400 (r-- --- ---). And change the ownership to the guest account. Then the files will be readonly by that guest user.

The command for changing permission is chmod.
The command to change ownership is chown. You need to be root to change ownership.

Here is a handy script to change permission and ownership of everything inside a directory:

	# usage: set_ownership_and_readonly  $DIR $USERNAME
	# changes ownership of file inside $DIR to $USERNAME
	# For example,
	#    > su root
	#    # set_ownership_and_readonly  /scrs1/bigdog/joe  guest01
	echo Setting files to read only ...
	find $1 -type f -print -exec chmod 400 {} \;

	echo changing ownership of files ...
	find $1 -type f -print -exec chown -R $2 {} \;

Example usage of the script:

   > su root
   # /home/denault/bin/set_ownership_and_readonly /scrs1/bigdog/joe_observer guest01

This script will set ownership of the files inside /scrs1/bigdog/joe_observer only to guest01.



In order to set permissions and ownership for MIRSI:


The cshell software will handle this.


The spex software will handle this. Refer to the spex observer startup page.


In order to set permissions and ownership for NSFCAM2:
Charles has added a login window to NSFCAM2 as well as a logout button for the NSFCAM2 GUI. On starting, the users are presented with a Login window, which has a drop down menu for selecting their guest account, and an Ok button for using that account. Once the guest account is selected, data will be written to a directory corresponding to that account.
At the end of their session, users need to click on the Logout button on the NSFCAM2 GUI. This will assign ownership and permissions to everything within the guest account data directory. Note: users will not have access to this data until it is moved over to the scratch disk, SCRS1.