{"id":564,"date":"2018-10-11T11:41:03","date_gmt":"2018-10-11T10:41:03","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf3\/?page_id=564"},"modified":"2026-10-30T12:04:52","modified_gmt":"2026-10-30T12:04:52","slug":"file-permissions","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/filesystems\/file-permissions\/","title":{"rendered":"Directory Permissions and File Sharing"},"content":{"rendered":"<p>If you are unfamiliar with Linux file permissions you should consider reading sections 5.1 and 5.2 of <a href=\"https:\/\/info-ee.surrey.ac.uk\/Teaching\/Unix\/unix5.html\" target=\"_blank\" rel=\"noopener\">this Intro to Linux course<\/a> (from the University of Surrey) first.<\/p>\n<h2>Home Directory Permissions<\/h2>\n<p>The default permissions on your <em>home<\/em> directory on the CSF allow access to you (the user) only. The directory is private to you.<\/p>\n<p>Every user on the CSF also belongs to a <em>unix group<\/em> on the system. This usually represents your research group, but could represent your school or faculty if your access to the CSF is the result of a school or faculty contribution. For example, users in the Department of MACE are members of the <code>mace01<\/code> <em>unix group<\/em> on the CSF.<\/p>\n<p>It is possible to allow other users in your <em>unix group<\/em> to access your <em>home<\/em> directory (e.g., to share files), but this is <em>not<\/em> the default.<\/p>\n<p>You can run the commands in <code><strong>bold<\/strong><\/code> at the login node prompt below. For example:<\/p>\n<pre>[<em>username<\/em>@login1[csf3] ~]$ <strong>ls -ld $HOME<\/strong>\r\ndrwx------ 37 <em>username<\/em> zz01 4096 Aug 15 09:59 \/mnt\/iusers01\/zz01\/<em>username<\/em>\r\n||_||_||_|              |\r\n| |  |  |               +--- Your <em>unix group<\/em> (based on the CSF contribution you are assigned to)\r\n| |  |  |\r\n| |  |  +-- (---) indicates <em>others<\/em> (all users) CANNOT access your HOME dir\r\n| |  +----- (---) indicates people in your <em>group<\/em> (zz01) CANNOT access your HOME dir\r\n| +-------- (rwx) indicates <em>user<\/em> (you) CAN <strong>r<\/strong>ead, <strong>w<\/strong>rite and e<strong>x<\/strong>ecute (enter) your home directory.\r\n|\r\n+----- <strong>d<\/strong>irectory (will be a dash <strong>-<\/strong> if looking at a file's properties)\r\n\r\n<\/pre>\n<p>If you want colleagues in your group to be able to read and copy some of your files, you can set <em>group<\/em> permissions with the <code>chmod<\/code> command as follows:<\/p>\n<pre>[username@login2[csf3] ~]$ <strong>chmod g+rx $HOME<\/strong>\r\n                                  #\r\n                                  # This adds <strong>g<\/strong>roup <strong>r<\/strong>ead and e<strong>x<\/strong>ecute\r\n                                  # permissions to your home directory.   \r\n<\/pre>\n<p>Let&#8217;s check how it looks now:<\/p>\n<pre>[username@login2[csf3] ~]$ <strong>ls -ld $HOME<\/strong>\r\ndrwxr-x--- 37 username zz01 4096 Aug 15 09:59 \/mnt\/iusers01\/zz01\/<em>username<\/em>\r\n    |_|\r\n     |\r\n     +---- Now members of your <em>group<\/em> (zz01) CAN <strong>r<\/strong>ead and e<strong>x<\/strong>ecute (enter) your\r\n           HOME dir but notice they CANNOT <strong>w<\/strong>rite to it.\r\n\r\n<\/pre>\n<p>The default file permissions\u00a0<strong>within<\/strong> home directories should be sufficient to now allow people from <strong>your group<\/strong> to read the contents of the files and to copy them to their own home directory. If opening the permissions to <em>all members<\/em> your group is too wide-open, then please let us know who you would like to have access, and we will advise further.<\/p>\n<div class=\"warning\">\n<p>It is highly recommended that you\u00a0<strong>never<\/strong> give anyone else\u00a0<em>write<\/em> (<code>w<\/code>) permission to your directory or files as this allows them to modify or delete them.Please note that directory permissions override file permissions.<\/p>\n<p>Also be aware that groups can be very large and contain a lot of people with whom you do not directly work.<\/p>\n<p>If you want your colleagues to be able to edit \/ write new \/ delete files in your area please fill in our <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/hpc-help\">help form<\/a> to request advice.<\/p>\n<\/div>\n<h2>Scratch Directory Permissions<\/h2>\n<p>Default permissions on your <em>scratch<\/em> directory are the same as on your <em>home<\/em> directory &#8211; your <em>scratch<\/em> directory is private to you. As with the <em>home<\/em> directory, it is possible to change the permissions on your scratch directory to allow your colleagues to access your files.<\/p>\n<p>NOTE: When working with scratch permissions you must use the direct path to your scratch directory:<\/p>\n<pre>\/scratch\/<em>username<\/em>\r\n           #\r\n           # Use your own username here\r\n<\/pre>\n<p>NOT the symnlink\/shortcut you have in your <em>home<\/em> directory. Thus the command to check your <em>scratch<\/em> permissions would be:<\/p>\n<pre>ls -ld \/scratch\/<em>username<\/em>\r\n<\/pre>\n<p>If you need to change your scratch permissions then the procedure is the same as for <em>home<\/em> &#8211; see above.<\/p>\n<div class=\"warning\">\n<p><strong>Remember:<\/strong> the <em>scratch<\/em> filesystem IS NOT backed up. It is highly recommended that you\u00a0<strong>never<\/strong> give anyone else\u00a0<em>write<\/em> (<code>w<\/code>) permission to your directory or files as this allows them to modify or delete them.Please note that directory permissions override file permissions.<\/p>\n<p>Also be aware that groups can be very large and contain a lot of people with whom you do not directly work.<\/p>\n<p>If you want your colleagues to be able to edit \/ write new \/ delete files in your area please fill in our <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/hpc-help\">help form<\/a> to request advice.<\/p>\n<\/div>\n<h2>Group Research Data Storage<\/h2>\n<p>Some groups have an allocation of Research Data Storage (RDS) on the CSF. This is additional storage that can provide a lot more capacity than your group&#8217;s <em>home<\/em> area &#8211; usually several TB&#8217;s worth of storage. RDS storage is backed-up, just like your <em>home<\/em> directory, and is suitable for long-term storage of important files (e.g., data-sets, results).<\/p>\n<p>For example:<\/p>\n<pre>\/mnt\/<em>fac<\/em>01-rds\/smith-project\/\r\n      #                #\r\n      #                # The directory name usually indicates the PI and project name\r\n      #\r\n      # <em>fac<\/em> is usually a short form of your faculty \r\n<\/pre>\n<p>which usually contains a directory for each person authorised to use the space and sometimes shared directories.<\/p>\n<h3>Permissions for RDS owners &#8211; keeping your RDS secure<\/h3>\n<p>If you are anything other than a read-only member of an RDS share on iCSF or CSF3, you need to understand how to control access to directories and files.<\/p>\n<div class=\"warning\">It is critical that you do not accidentally give access to large numbers of CSF users when changing permissions, if you are unsure how to adjust permissions, <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/hpc-help\">ask for support<\/a>, DO NOT rely on AI chatbot suggestions.<\/div>\n<h3>Linux permissions explained for RDS<\/h3>\n<p>Every file and directory has permissions for three types of users:<\/p>\n<p><strong>User (the owner)<\/strong><br \/>\nOften the person who created the directory or file, but on RDS you may be given ownership by the admins to allow you to manage the directory.<\/p>\n<p><strong>Group<\/strong><br \/>\nA defined group of users. On RDS these are the groups users are added to when access is granted.<\/p>\n<p><strong>Other<\/strong><br \/>\nEveryone else.<\/p>\n<p>You must be very careful with \u2018other\u2019 permissions if you are the owner of a top-level directory, as setting \u2018other\u2019 permissions can give access to all users of the CSF.<\/p>\n<p>For each of the 3 types of users above, three permissions can be given:<\/p>\n<ul>\n<li>r = read = view the contents.<\/li>\n<li>w = write = change the contents.<\/li>\n<li>x = execute = run a file as a program or, in the case of a directory, navigate into it.<\/li>\n<\/ul>\n<p>In general, a top-level RDS directory will have permissions:<\/p>\n<pre>drwxr-x--- 37 username groupname 4096 Feb 29 01:54 \/mnt\/fac01-rds\/project\r\n<\/pre>\n<p>Owner has full access; group members have read and execute (means they can navigate into the directory)<\/p>\n<p>Or:<\/p>\n<pre>drwxrwx--- 37 username groupname 4096 Feb 29 01:54 \/mnt\/fac01-rds\/project\r\n<\/pre>\n<p>Owner and group members have full access (but only the owner can control permissions of the directory)<\/p>\n<p>A top-level directory will generally <strong>not<\/strong> look like:<\/p>\n<pre>drwxrwx<strong>r-x<\/strong> 37 username groupname 4096 Feb 29 01:54 \/mnt\/fac01-rds\/project\r\n<\/pre>\n<p>as the last <strong>r-x<\/strong> means that all users of CSF can read the contents.<\/p>\n<h3>Modifying permissions<\/h3>\n<p>You must be the owner of a file or directory to change permissions.<\/p>\n<p>You can change permissions using the <code>chmod<\/code> command.<\/p>\n<p>To give the group members read access to a file:<br \/>\nassign group read:<\/p>\n<pre>chmod  g+r  filename\r\n<\/pre>\n<p>check permissions:<\/p>\n<pre>ls -l filename\r\n<\/pre>\n<p>for a directory:<\/p>\n<pre>chmod g+rx directoryname\r\n<\/pre>\n<p>for a directory and all files and subdirectories within:<\/p>\n<pre>chmod -R g+rx directoryname\r\n<\/pre>\n<p>The -R option (recursive) can take some time to complete for large numbers of directories and files.<\/p>\n<p>check with:<\/p>\n<pre>ls -ld directoryname\r\n<\/pre>\n<p>To remove group access from a file:<\/p>\n<pre>chmod  g-r  filename\r\n<\/pre>\n<p>for a directory:<\/p>\n<pre>chmod g-rx directoryname\r\n<\/pre>\n<p>If you need any more complex permissions or are unsure <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/hpc-help\">ask for support.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are unfamiliar with Linux file permissions you should consider reading sections 5.1 and 5.2 of this Intro to Linux course (from the University of Surrey) first. Home Directory Permissions The default permissions on your home directory on the CSF allow access to you (the user) only. The directory is private to you. Every user on the CSF also belongs to a unix group on the system. This usually represents your research group, but.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/filesystems\/file-permissions\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":94,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-564","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/comments?post=564"}],"version-history":[{"count":20,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/564\/revisions"}],"predecessor-version":[{"id":12967,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/564\/revisions\/12967"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/94"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/media?parent=564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}