Skip to main content

Linux File System Permissions

Access to files by users are controlled by file permissions. The Linux file permissions system is simple but flexible, which makes it easy to understand and apply, yet able to handle most normal permission cases easily.
Files have just three categories of user to which permissions apply. The file is owned by a user, normally the one who created the file. The file is also owned by a single group, usually the primary group of the user who created the file, but this can be changed. Different permissions can be set for the owning user, the owning group, and for all other users on the system that are not the user or a member of the owning group.
The most specific permissions apply. So, user permissions override group permissions, which override other permissions.
In the graphic that follows, joshua is a member of the groups joshua and web, while allison is a member of allison, wheel, and web. When joshua and allison have the need to collaborate, the files should be associated with the group web and the group permissions should allow the desired access.
Group membership illustration
There are also just three categories of permissions which apply: read, write, and execute. These permissions affect access to files and directories as follows:
Effects of Permissions on Files and Directories
Permission Effect on files Effect on directories
r (read) Contents of the file can be read. Contents of the directory (file names) can be listed.
w (write) Contents of the file can be changed. Any file in the directory may be created or deleted.
x (exec) Files can be executed as commands. Contents of the directory can be accessed (dependent on the permissions of the files in the directory).

Note that users normally have both read and exec on read-only directories, so that they can list the directory and access its contents. If a user only has read access on a directory, the names of the files in it can be listed, but no other information, including permissions or time stamps, are available, nor can they be accessed. If a user only has exec access on a directory, they cannot list the names of the files in the directory, but if they already know the name of a file which they have permission to read, then they can access the contents of that file by explicitly specifying the file name.
A file may be removed by anyone who has write permission to the directory in which the file resides, regardless of the ownership or permissions on the file itself. (This can be overridden with a special permission, the sticky bit, which will be discussed at the end of the unit.)

Comments

Popular posts from this blog

TCP/IP protocol

TCP (Transmission Control Protocol):- TCP (Transmission Control  Protocol ) is a standard that defines how to establish and maintain a network conversation via which  application programs  can exchange data. TCP works with the Internet Protocol ( IP ), which defines how computers send  packet s of  data  to each other. Together, TCP and IP are the basic rules defining the Internet. TCP is defined by the Internet Engineering Task Force ( IETF ) in the Request for Comment ( RFC ) standards document number 793. TCP is a connection-oriented protocol, which means a connection is established and maintained until the application programs at each end have finished exchanging messages. It determines how to break application data into packets that  networks  can deliver, sends packets to and accepts packets from the network layer, manages  flow contro l ,  and—because it is meant to provide error-free data transmi...

What is technical analysis?

 Technical Analysis (also abbreviated as TA) is a popular technique that allows you to do just that. It not only helps you develop a point of view on a particular stock or index but also helps you define the trade keeping in mind the entry, exit and risk perspective.  Like all research techniques, Technical Analysis also comes with its own attributes, some of which can be highly complex. However, technology makes it easy to understand. Technical Analysis is a research technique to identify trading opportunities in market based on the actions of market participants. The actions of market participants can be visualized by means of a stock chart. Over time, patterns are formed within these charts and each pattern conveys a certain message. The job of a technical analyst is to identify these patterns and develop a point of view. Like any research technique, technical analysis stands on a bunch of assumptions. As a practitioner of technical analysis, you need to trade the markets k...

connection oriented

connection-oriented:- connection-oriented  describes a means of transmitting data in which the devices at the end points use a preliminary  protocol  to establish an end-to-end connection before any data is sent. Connection-oriented protocol service is sometimes called a "reliable" network service, because it guarantees that data will arrive in the proper sequence. Transmission Control Protocol ( TCP ) is a connection-oriented protocol. For connection-oriented communications, each end point must be able to transmit so that it can communicate. The alternative to connection-oriented transmission is the  connection-less  approach, in which data is sent from one end point to another without prior arrangement. Connection-less protocols are usually described as  stateless  because the end points have no protocol-defined way to remember where they are in a "conversation" of message exchanges. Because they can keep track of a conversation, connection-or...

tag