Users and groups
On a GNU/Linux system, you can organize users into groups for easy administration — but you also need to provide access to files and folders through permissions. No blanket "power user" gives users access to everything on a computer or network, as it does on a Windows operating system. The GNU/Linux system was designed to be more secure; it works off a 3x3 system for granting permissions:
- File permissions. Read (r), write (w), and execute (x). Each of these permissions is also given a number: read = 4, write = 2, and execute = 1.
- Directory-level permissions. Enter, which gives permission to enter the directory; Show, which gives permission to see the contents of the directory; and Write, which gives permission to create a new file or subdirectory.
- How permissions are assigned. Permissions are assigned in three ways: by user level, group level, and other level. The user level defines the user who created the file or directory; the group level defines the group the user is in; and the other level is for any user outside of the user's group.
The user permissions are granted first: For example, r/w/x means the user can read, write, and execute the file or files in the folder. You can apply the number value to each permission. Thus, if a user can read, write, and execute, you add the corresponding numbers 4, 2, and 1 for a total of 7. Next come the group permissions. For instance, the other members of the user's group may be able to read and execute but not write. Adding up the corresponding values gives you 5. Those in the others category can only read the files, so their numerical value is 4. Thus, the permissions for the file or folder are 754.
When permissions are set to 777, everyone is given the ability to read, write, and execute. The
chmod command changes permissions for files and directories. If you want to change ownership of a user, use the
chown command. To change group ownership of a file or directory, use the