The Linux GUI Experience

The Linux GUI Experience

Sections: 1 | 2 | 3 | 4 | 5 | 6 | Index | Next >

File Management In Linux

Learning objective: Explain file management in Linux


Click on image to enlarge.

Most current file systems have methods of administering permissions or access rights to specific users and groups of users. These systems control the ability of the users affected to view or make changes to the contents of the file system. Unix-like and otherwise POSIX-compliant systems, including Linux-based systems and all Mac OS X versions, have a simple system for managing individual file permissions, or "traditional Unix permissions". [Wikipedia]

Hierarchical filing system

Refers to systems that are organized in the shape of a pyramid, with each row of objects linked to objects directly beneath it. Hierarchical systems pervade everyday life. The army, for example, which has generals at the top of the pyramid and privates at the bottom, is a hierarchical system. Similarly, the system for classifying plants and animals according to species, family, genus, and so on, is also hierarchical. Hierarchical systems are as popular in computer systems as they are in other walks of life. The most obvious example of a hierarchical system in computers is a file system, in which directories have files and subdirectories beneath them. Such a file organization is, in fact, called a hierarchical file system . In addition to file systems, many data structures for storing information are hierarchical in form. Menu-driven programs are also hierarchical, because they contain a root menu at the top of the pyramid and submenus below it. [Webopedia]

Read, Write, Execute

There are three specific permissions on Unix-like systems that apply to each class:

The effect of setting the permissions on a directory (rather than a file) is "one of the most frequently misunderstood file permission issues." When a permission is not set, the rights it would grant are denied. Unlike ACL-based systems, permissions on a Unix-like system are not inherited. Files created within a directory will not necessarily have the same permissions as that directory. [Wikipedia]

User, Group, Others

All users on a Linux system fall into one of these categories based on their relation to other users. Think of a box, inside a box, inside another box. The outside box is other users. All users are part of a group. One of many boxes inside the main box. The user is one of many boxes inside the group box. In the user box, the user has full control over their resources and can make available their resources to others by changing the permissions of the resources they control.

Files and Directories

The main issue between files and folders are execution permissions. If a file has been set to execution, it means it can be executed by the CPU and put into process. This is a common issue for many newbies in Linux when their application will not run. Check the permission settings for execution. For directories, the execution setting means execution for processes like directory listings, copying, renaming, and alike are available. If permissions are denied for a directory, the user has no access to its contents.

File -rwxr--r--

In this example, the user has full permissions (rwx), the group members can just read the file (r--), and everyone else on the system can also just read the file (r--). The first dash (-) signifies it is a file.

Folder drwxr-xr-x

In this example, the user has full permissions (rwx), the group members can just read and use the directory (r-x), and everyone else on the system can just read and use the directory (r-x). The first "d" (d) signifies it is a directory.

Thinking: Why have a simple permissions policy?

Key terms: execute, file, folder, group, other, permissions, read, user, write

Resources:
To maximize your learning, please visit these Web sites and review their content to help reinforce the concepts presented in this section.

Quick links:
File permissions @ Wikipedia
hierarchical @ Webopedia

Embedded Resources

Notes on navigation: Click inside the frame to navigate the embedded Web page. - Click outside the frame to navigate this page to scroll up/down between the embedded Web pages. - Click on the frame title to open that page in a new tab in most browsers. - Click on the the "Reload page" link to reload the original page for that frame.

File permissions @ Wikipedia | Reload page | If frame is empty, click on the link to view the page in a new tab or window

hierarchical @ Webopedia | Reload page | If frame is empty, click on the link to view the page in a new tab or window

Sections: 1 | 2 | 3 | 4 | 5 | 6 | Index | Next >