rsnt_translations
56,420
edits
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
<!--T:49--> | <!--T:49--> | ||
<b>IMPORTANT NOTE: Don't ever issue a bulk | <b>IMPORTANT NOTE: Don't ever issue a bulk <code>chmod -R 777</code> on your home folder, in fact on any of your folders for that matter. This is a HUGE security risk, and completely unacceptable on a shared HPC facility such as the Alliance clusters. In addition, it's never necessary</b> | ||
<!--T:9--> | <!--T:9--> | ||
Line 17: | Line 17: | ||
<!--T:2--> | <!--T:2--> | ||
Like most modern filesystems, those used on our clusters support the idea of permissions to read, write, and execute files and directories. When you attempt to read, modify or delete a file, or access a directory, e.g. with < | Like most modern filesystems, those used on our clusters support the idea of permissions to read, write, and execute files and directories. When you attempt to read, modify or delete a file, or access a directory, e.g. with <code>cd</code>, the Linux kernel first verifies that you have the right to do this. If not, you'll see the error message "Permission denied". For each filesystem object (file or directory) there are three categories of users: | ||
* the object's owner --- normally the user who created the object, | * the object's owner --- normally the user who created the object, | ||
* members of the object's group --- normally the same as the owner's default group, and | * members of the object's group --- normally the same as the owner's default group, and | ||
Line 26: | Line 26: | ||
You can see what the current permissions are for a filesystem object with the command | You can see what the current permissions are for a filesystem object with the command | ||
{{Command|ls -l name_of_object}} | {{Command|ls -l name_of_object}} | ||
which will print out the permissions for the owner, the group, and everyone else. For example, a file with permissions < | which will print out the permissions for the owner, the group, and everyone else. For example, a file with permissions <code>‑rw‑r‑‑r‑‑</code> means the owner can read it and write it but not execute it, and the group members and everyone else can only read the file. You'll also see printed out the name of the object's owner and the group. | ||
<!--T:4--> | <!--T:4--> | ||
To change the permissions of a file or directory you can use the command < | To change the permissions of a file or directory you can use the command <code>chmod</code> along with the user category, a plus or minus sign indicating that permission is granted or withdrawn, and the nature of the permission: read (<code>r</code>), write (<code>w</code>) or execute (<code>x</code>). For the user category, we use the abbreviations <tt>u</tt> for the owner (user), <tt>g</tt> for the group and <tt>o</tt> for others, i.e. everyone else on the cluster. So a command like | ||
{{Command|chmod g+r file.txt}} | {{Command|chmod g+r file.txt}} | ||
would grant read permission to all members of the group that file.txt belongs to, while | would grant read permission to all members of the group that file.txt belongs to, while |