Urgent.News

What's breaking now, across thousands of outlets.

Tech

Linux's file permissions are over 50 years old, and three letters still decide who can touch every file on your PC

You can see them in action with a single console command.

Linux's file permissions are over 50 years old, and three letters still decide who can touch every file on your PC

Linux file permissions have roots dating back over 50 years, and three letters still dictate who can access every file on your computer. This technology emerged in 1971 and is still in use today, showing its enduring relevance. To understand how we reached this point, we must travel back to the 1960s when an operating system called Multics operated.

Multics utilized a complex system of permissions to control file access, with each file containing a list of rules similar to a doorman with a clipboard. This system, while secure, was cumbersome for administrators and costly in terms of memory and processing power for the computing era.

Two researchers, Ken Thompson and Dennis Ritchie, left Multics in 1969 to develop a new operating system, Unix. They wanted something more manageable and easily understandable than Multics' permission system. After some research, they discovered that a file's permissions didn't need to be as granular as Multics' approach. They determined that just nine numbers, divided into three groups, could effectively represent permissions.

This was accomplished using base-2 mathematics, where the first digit represents 1, the second 2, and the third 4. Each digit could only be 0 or 1, resulting in binary code.

In their 1971 Unix Programmer's Manual, Thompson and Ritchie assigned each binary digit a specific function: the leftmost digit represented read permission, the middle was write permission, and the rightmost was execution permission. A 1 meant the action was allowed, while a 0 indicated it was not. If you saw the binary number 101, it meant someone could read and execute the file but not modify it.

This binary system could be converted into base-8, a more human-friendly format. For example, the binary number 101 would translate to the base-8 number 5.

Thompson and Ritchie then combined these three trio numbers to represent three levels of access for three different types of users: the owner, a recognized group, and everyone else. For instance, granting the owner full access (111), members of a recognized group read and execute permissions without editing (101), and everyone else only reading access (100) would result in the string 111 101 100, which converts to the base-8 number 754.

This nine-digit binary system, now known as the rwx system, allowed for the definition of three levels of access for different user types. In 1991, Linus Torvalds adopted this system while creating Linux to ensure compatibility with existing Unix tools. Although Linux security has evolved since then, the rwx system remains an integral part of your computer today, evident in commands like "ls -l," where the letters at the beginning of each line represent the permissions granted to files.

Written by urgent.news from XDA Developers's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at xda-developers.com →

More in Tech

More from Wednesday 4 November →