E-learning module "Linux Basics"

Introduction

The multi user operating system Linux has a sophisticated system of access rights and privileges.

Files can be be opened, read, written, executed etc. But who is allowed to do what?

There are three standard permissions read, write, execute:

  •  read
    • Content of files and directories can be displayed.
  • write
    • Content of a file can be changed.
    • Inside a directory new files can be created, existing can be deleted.
  • execute
    • A file (e.g. a program) can be executed.
    • If the permission is set on a directory, it is allowed to change into this directory (using the command cd).

Permissions are assigned to user, group and others.

 

Sample output of ls -l (long format).
  drwxr-xr-x  2 user1 users        3 28. Mai 2014  verz
  -rw-r--r--  1 user1 users    43620 15. Mär 2015  b.txt

rwxr-xr-x in the first output line means that the user has the rights rwx, and that the members of the group and all other users have the rights r and x.

Furthermore, the user/owner of the file b.txt is user1. The file belongs to the group users.
The size (in bytes) of file b.txt is 43620, and the date of the last change is 15. Mär 2015.

b.txt is the name of the file or directory. Files whose name starts with a . dot are so called hidden files.

The very first entry on the left is the type of the file:
d → directory
- → file
l → link etc.

The content of this e-learning module is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany license (CC BY-NC-SA 3.0 DE).



Bisher wurde noch kein Kommentar abgegeben.