One of the core pieces of security in Unix/Linux systems is limiting privileges by user. For instance, certain actions can only be done by the root user. In theory, this can keep a malicious process from causing too much harm.
But what mechanism enforces this?
As far as I know, there are basically two ways of password-protecting something:
- Superficially: When Windows XP boots, it may ask for a password. Without the password, it won't let you log in, which might stop someone from accessing a file on the computer. But this only works if the attacker boots Windows; if they boot a different operating system and mount the hard drive, there is no protection on the file.
- Cryptographically: Password management programs typically store passwords in a file. This file is encrypted with a "master password." Unless you supply the master password, the program not only will not, but truly cannot give you access to the file; it does not know how.
Which category do Unix/Linux user permissions fall under, and how is this enforced?
execute operation
on aninode
, which is not our's. For example[user1@localhost ~]$ sudo chown -R user2:group2 Documents/
This will ask for sudo password and refuses if we don't have, just because inode permissions of /usr/bin/chown file does not belong to user1 in any ways (owner/group/other). Unix kernel can read and load a file into memory for execution only if it hasaccess permission
on the inodes the file points to.