Setting Permissions
Linux
Introduction
For a general introduction to Linux file permissions, see
this link.
Viewing Permissions
- login to any CLASSE Linux system (such as lnx201)
- Use ls -l to view the permissions of the directory you are interested in
Default Permissions
To change the permissions of new files and directories created from Linux, use the
umask
command. This is commonly added to your ~/.bashrc
LoginScripts file. For example:
-
umask 002
: user and group can read and write, everyone else can just read
-
umask 022
: user can read and write, everyone else can just read
-
umask 077
: user can read and write, no-one else can read or write
Setting Permissions
- login to any CLASSE Linux system (such as lnx201)
- Change to the desired directory.
-
cd /nfs/user
Note: there is a space between cd and /
- Change the permissions appropriately. See The man page for chmod or type
man chmod
for LOTS of information.
- If you want to change the group that can access the folder, you use chgrp (see
man chgrp
or man chown
).
- If you need special groups to access the folder that do not currently exist, please open a service ticket.
- If you want help or training on this, please open a service ticket.
Examples
- Make it so that only you can modify files in your User directory, but anyone with a CLASSE account can view and read. These are the default permissions.
-
chmod -R 755 /nfs/user/dab66
- Make it so that nobody besides you can access your private subdirectory. Again, these are the default permissions.
-
chmod -R 700 /nfs/user/dab66/private
Windows
In general, permissions on filesystems accessed from Windows using samba must be modified from Linux as documented above.
- Right Click on the document or folder you want to change the permissions on.
- In the dialog box, select the \Users (this will apply to all domain user accounts, but not Administrators). If a directory, select if you want it to apply these settings to all subfolders/files (normally you want to do this). Select the type of Access you want, click OK.
>