Difference between revisions of "Shared Work Space"

From Storrs HPC Wiki
Jump to: navigation, search
(Large/Persistent Group Work: Added /archive as option for shared work space)
(Small Group File/Directory Sharing)
Line 1: Line 1:
 
=Small Group File/Directory Sharing=
 
=Small Group File/Directory Sharing=
You can use file access control list (facl's) to allow specific users to access files.
+
Normal UNIX permissions managed through chown, and chmod, are extremely limited.
 +
One major limitation is that they do not allow users to hand files away to other specific user's.
 +
However, you can use file access control list (facl's) to allow specific users/groups to access your files, on top of the regular UNIX permissions.
 +
The advantage to this is that you do not need to contact our support team to provide shared work space, and can instead do it yourself.
 +
 
 +
To give one other user some ''permissions''(same format as UNIX permissions) to access your file you can do something akin to the following:
 
  $ setfacl -m "u:''user_name'':''permissions''' ''example_file''
 
  $ setfacl -m "u:''user_name'':''permissions''' ''example_file''
  
You can also set a default ACL for a directory.
+
To make your permission permeate to all new subdirectories and files you can set a default ACL for some directory.
 
  $ setfacl -dm "u:''user_name'':''permissions''' ''example_dir''
 
  $ setfacl -dm "u:''user_name'':''permissions''' ''example_dir''
  
The default will be applied to all newly created subdirectories and files, so you may use it to make an entire directory accessible to a user/group.
+
Properly set default ACLs, will be functionally equivalent to the shared work directories we can create for you.
 +
The advantage again being that you can make these shared work directories yourselves, you can even make your home directory readable by your colleagues.
  
 
To create a shared directory on our temporary file system you would do:
 
To create a shared directory on our temporary file system you would do:
Line 13: Line 19:
  
 
You can add any number of "u:''user_name'':''perm''" fields to the above command while replacing the italicized areas appropriately.  
 
You can add any number of "u:''user_name'':''perm''" fields to the above command while replacing the italicized areas appropriately.  
 +
 +
To check some file or directories Access Control List you can do:
 +
$ getfacl ''dir_or_file''
  
 
For more information you can go to:
 
For more information you can go to:

Revision as of 11:36, 13 July 2017

Small Group File/Directory Sharing

Normal UNIX permissions managed through chown, and chmod, are extremely limited. One major limitation is that they do not allow users to hand files away to other specific user's. However, you can use file access control list (facl's) to allow specific users/groups to access your files, on top of the regular UNIX permissions. The advantage to this is that you do not need to contact our support team to provide shared work space, and can instead do it yourself.

To give one other user some permissions(same format as UNIX permissions) to access your file you can do something akin to the following:

$ setfacl -m "u:user_name:permissions' example_file

To make your permission permeate to all new subdirectories and files you can set a default ACL for some directory.

$ setfacl -dm "u:user_name:permissions' example_dir

Properly set default ACLs, will be functionally equivalent to the shared work directories we can create for you. The advantage again being that you can make these shared work directories yourselves, you can even make your home directory readable by your colleagues.

To create a shared directory on our temporary file system you would do:

$ mkdir /scratch/shared_dir_name
$ setfacl -dm "u:your_user_name:rw-" "u:associate_1_user_name:rw-" "u:associate_2_user_name:rw-" /scratch/shared_dir_name

You can add any number of "u:user_name:perm" fields to the above command while replacing the italicized areas appropriately.

To check some file or directories Access Control List you can do:

$ getfacl dir_or_file

For more information you can go to:

https://wiki.archlinux.org/index.php/Access_Control_Lists
http://vanemery.net/Linux/ACL/linux-acl.html#scenario

Large/Persistent Group Work

If you're in a large group, or your work requires persistent storage, you should open a ticket with Storrs HPC support, and we will evaluate if it necessary to provide disk space on /shared/, or /archive/.