var unreadAlerts = '1';
You have one unread private message from dkota titled Welcome to the Forum!

Linux Roles and File Permissions
#1
 
In Linux, most system entities are treated as files. In order to organize the system and enforce boundaries within the computer, Linux uses file permissions. File permissions are built into the file system structure and provide a mechanism to define permissions on every file. Every file in Linux carries its file permissions, which define the actions that the owner, the group, and others can perform with the file. The possible permission rights are Read, Write and Execute. The ls command with the -l parameter lists additional information about the file.

Consider the output of the ls -l command in the command output.

[user@linux: ~]$ ls -l space.txt
-rwxrw-r-- 1 user group 253 May 20 12:49 space.txt
    (1)        (2)  (3)    (4)      (5)         (6)                 (7)

The output provides a lot of information about the file space.txt.

The first field of the output displays the permissions that are associated with space.txt (-rwxrw-r--). File permissions are always displayed in the User, Group, and Other order.

The file space.txt in has the following permissions:

    The dash (-) means that this is a file. For directories, the first dash would be a “d”.
    The first set of characters is for user permission (rwx ). The user, who owns the file can Read, Write and eXecute the file.
    The second set of characters is for group permissions (rw-). The group, who owns the file can Read and Write to the file.
    The third set of characters is for any other user or group permissions (r--). Any other user or group on the computer can only Read the file.

The second field defines the number of hard links to the file (the number 1 after the permissions). A hard link creates another file with a different name linked to the same place in the file system (called an inode). This is in contrast to a symbolic link, which I will post about.

The third and fourth field display the user and group who own the file, respectively.

The fifth field displays the file size in bytes. The space.txt file has 253 bytes.

The sixth field displays the date and time of the last modification.

The seventh field displays the file name.
File permissions are a fundamental part of Linux and cannot be broken. A user has only the rights to a file that the file permissions allow. The only user that can override file permission on a Linux computer is the root user. Because the root user has the power to override file permissions, the root user can write to any file. Because everything is treated as a file, the root user has full control over a Linux computer.
Report


Quick Reply
Message
Type your reply to this message here.



Possibly Related Threads…
Thread Author Replies Views Last Post
  Kali Linux 2023.2 is out OptimusCrime 6 86 06-14-2023, 04:32 PM
Last Post: user1234567
  Binary Exploitation #1 - Basic Linux stack overflows DerRoteMilan 3 64 06-12-2023, 05:39 PM
Last Post: big_boobies



Users browsing this thread: purely_cabbage
var thread_deleted = "0"; if(thread_deleted == "1") { $("#quick_reply_form, .new_reply_button, .thread_tools, .inline_rating").hide(); $("#moderator_options_selector option.option_mirage").attr("disabled","disabled"); }