26.10.2012 Views

SUSE LINUX Documentation - Index of

SUSE LINUX Documentation - Index of

SUSE LINUX Documentation - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

such as installing new programs, are also usually impossible or restricted for normal<br />

users. Only the root user, or super user, has the unrestricted capacity to make changes<br />

to the system and unlimited access to all files. Those who use this concept wisely, only<br />

logging in with full root access when necessary, can cut back the risk <strong>of</strong> unintentional<br />

loss <strong>of</strong> data. Because under normal circumstances only root can delete system files or<br />

format hard disks, the threat from the Trojan horse effect or from accidentally entering<br />

destructive commands can be significantly reduced.<br />

3.2.1 File System Permissions<br />

Basically, every file in a Linux file system belongs to a user and a group. Both <strong>of</strong> these<br />

proprietary groups and all others can be authorized to write, read, or execute these files.<br />

A group, in this case, can be defined as a set <strong>of</strong> connected users with certain collective<br />

rights. For example, call a group working on a certain project project3. Every user<br />

in a Linux system is a member <strong>of</strong> at least one proprietary group, normally users.<br />

There can be as many groups in a system as needed, but only root is able to add<br />

groups. Every user can find out, with the command groups, <strong>of</strong> which groups he is a<br />

member.<br />

File Access<br />

The organization <strong>of</strong> permissions in the file system differs for files and directories.<br />

File permission information can be displayed with the command ls -l. The<br />

output could appear as in Example 3.1, “Sample Output Showing File Permissions”<br />

(page 103).<br />

Example 3.1 Sample Output Showing File Permissions<br />

-rw-r----- 1 tux project3 14197 Jun 21 15:03 Roadmap<br />

As shown in the third column, this file belongs to user tux. It is assigned to the<br />

group project3. To discover the user permissions <strong>of</strong> the Roadmap file, the first<br />

column must be examined more closely.<br />

-<br />

Type<br />

rw-<br />

Users Permissions<br />

r-<br />

Group Permissions<br />

---<br />

Permissions for Other<br />

Users<br />

Working with the Shell 103

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!