{"id":139480,"date":"2022-04-01T12:57:09","date_gmt":"2022-04-01T16:57:09","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=139480"},"modified":"2022-04-01T12:57:09","modified_gmt":"2022-04-01T16:57:09","slug":"project-disk-file-access","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/using-file-system\/file-permissions\/project-disk-file-access\/","title":{"rendered":"Project and STASH Disk Space File Access"},"content":{"rendered":"<p>As of May 16, 2019, the default permissions for all top-level Project Disk Space directories and STASH directories on the SCC are set such that only project group members have any access to the files. This means that, regardless of how permissions are set within lower level directories, people who are not members of the project will not be able to access any of the files. For your own files\/directories, you can further limit them so that even group members have limited access, but you cannot grant people outside the project access without opting out of this policy as discussed below. For all <code>\/restricted<\/code> directories, this has been the policy for many years and cannot be changed.<\/p>\n<p>The project spaces affected include:<\/p>\n<pre class=\"code-block\"><code>\/project\/<span class=\"placeholder\">PROJECTNAME<\/span>\/             \/restricted\/project\/<span class=\"placeholder\">PROJECTNAME<\/span>\/\r\n\/projectnb\/<span class=\"placeholder\">PROJECTNAME<\/span>\/           \/restricted\/projectnb\/<span class=\"placeholder\">PROJECTNAME<\/span>\/\r\n\/stash\/<span class=\"placeholder\">PROJECTNAME<\/span>\/               \/restricted\/stash\/<span class=\"placeholder\">PROJECTNAME<\/span>\/<\/code><\/pre>\n<h2>Granting Access to Files to People who are <b>not<\/b> Members of your Project<\/h2>\n<p>If you are the Lead Project Investigator (LPI) for a project, you can opt out of the default permissions and ask us to allow all SCC users to have limited access to your project space(s). This is allowed on the <code>\/project<\/code>, <code>\/projectnb<\/code>, and <code>\/stash<\/code> spaces to give read and execute access to the world, if the lower level files\/directories\u2019 permissions also allow that. This is most commonly needed for projects that are serving primarily or partially as data storage where a large number of people need read access to the files and you do not want to have to add and remove those people from the project group. To do this, send email to <a href=\"mailto:help@scc.bu.edu\">help@scc.bu.edu<\/a> and indicate the top-level Project directory(-ies) you wish to have the permissions changed for.<\/p>\n<p>If you do this, you should be very careful about setting permissions on your files\/directories or it may be possible for any SCC user on the system to accidentally delete some of your files.  In general, you should almost never set global\/world write permissions for any directory or file.   Note that although you can set such permissions yourself (<code style=\"white-space: nowrap;\"><span class=\"command\">chmod 666<\/span> <span class=\"placeholder\">filename<\/span><\/code>), you can also end up with files with those permissions via many other ways.  Some of these include transferring them from another machine (such as via <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/rcs-archive\/system-usage-old\/getting-started\/get-started-file-transfer\/globus-online\/\">Globus<\/a> or SFTP), copying them from another user, or by using a command such as <code><span class=\"command\" style=\"white-space: nowrap;\">tar -x<\/span><\/code>.<\/p>\n<h2>Controlling Access to Files for Project Group Members<\/h2>\n<p>You can use the standard Linux commands <b><a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/rcs-archive\/system-usage-old\/using-scc\/managing-files\/chmod\/\">chmod<\/a><\/b> and <b><a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/rcs-archive\/system-usage-old\/using-scc\/managing-files\/umask\/\">umask<\/a><\/b> to control access to files within your directories.  <a href=\"mailto:help@scc.bu.edu\">Contact us<\/a> if you need help with this or need to have some unusual file access scheme set up and we may be able to help.<\/p>\n<h2>Using the <b>sticky bit<\/b> to Protect Files<\/h2>\n<p>Using the Linux <a href=\"https:\/\/en.wikipedia.org\/wiki\/Sticky_bit\">sticky bit<\/a>, it is possible to create a <b>directory<\/b> which is world writable but where only the person who writes a given file\/directory can then delete it.  An example is given below.  Note the characters highlighted in yellow.<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc1%<\/span> <span><span class=\"command\">mkdir<\/span> <span class=\"placeholder\">myrepository<\/span> \r\n<span class=\"prompt\">scc1%<\/span> <span><span class=\"command\">chmod<\/span> <span style=\"background:#FFFF00\">1<\/span>777 <span class=\"placeholder\">myrepository<\/span>\r\n<span class=\"prompt\">scc1%<\/span> <span><span class=\"command\">ls -l<\/span> <span class=\"placeholder\">myrepository<\/span>\r\n<span class=\"output\">total 1\r\ndrwxrwxrw<span style=\"background:#FFFF00\">t<\/span> 2 aarondf scv 512 Apr 24 14:30 myrepository\/<\/span><\/code><\/pre>\n<p>A user who has access to the directory containing <code><span class=\"placeholder\">myrepository<\/span><\/code> will be able to write files\/directories to this directory and only he\/she (and also the directory owner) will be able to delete those files\/directories.<\/p>\n<p>Used carefully, this feature can protect a directory that needs to have group (and world) write access from accidental deletion of files by group members (for all projects) or by everyone on the system (for those opting out of the default permissions).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As of May 16, 2019, the default permissions for all top-level Project Disk Space directories and STASH directories on the SCC are set such that only project group members have any access to the files. This means that, regardless of how permissions are set within lower level directories, people who are not members of the&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":137939,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/139480"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1692"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=139480"}],"version-history":[{"count":1,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/139480\/revisions"}],"predecessor-version":[{"id":139481,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/139480\/revisions\/139481"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137939"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=139480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}