File Permissions

By default, all home directories are world readable, which means uses can go between each other’s directories without having to change the permissions, but users cannot copy (write permission) or run (execute permission) files unless the permissions are modified by the user who owns them.

Changing file permissions is the correct way to let other lab mates access the files in your home directory, but it should be done with full paths and not with wild cards. For example, if you wanted to share the file “test.py” in your home directory, you would want to do:

chmod [options] /home/[user]/test.py

instead of something like

chmod [options] *

Using wild cards such as * always include hidden folders and files, such as your .ssh keys.

You can change the entire permissions of subdirectories (like /home/[user]/test_directory) but when you change the permissions of your entire home directory, (/home/[user]) you will change the permissions of the hidden files and subdirectories in that home directory, which include the hidden folder that your ssh keys. If this hidden .ssh folder has it’s permissions changed, 9 times out of 10 it will break your ssh command to log into the cluster, since ssh is picky about the file permissions set on ssh keys.

You can use the chmod command to limit access to files and directories.

See here for an introduction to file permissions and the chmod command.

You can also use this website for an interactive GUI that will help direct you to the chmod command options that are correct for the intentions you have for sharing your files with others.