File System
/bin - basic programs (ls, cd, cat, etc.)
/sbin - system programs (fdisk, mkfs, sysctl, etc)
/etc - configuration files
/tmp - temporary files (typically deleted on boot)
/usr/bin - applications (apt, ncat, nmap, etc.)
/usr/share - application support and data files
Adding to PATH
File Permissions
The first character is for type [ - : File, d: Directory]
-r : 4 bits
-w : 2 bits
-x : 1 bit
-t : Sticky bit : The sticky bit only allows the user who created a file in this directory (or the owner of the directory, ie:
root
) to modify this file.-s: SUID Bit :-When a command or script with SUID bit set is run, its effective UID becomes that of the owner of the file, rather than of the user who is running it.
If a capital “S” appears in the owner’s execute field, it indicates that the setuid bit is on, and the execute bit “x” for the owner of the file is off or denied.
Total: 7 bits. [eg: chmod 777]
SUID bit: Runs files with the permissions of a specified user.
SUID bit [s] replaces x for User
SGID bit [s] replaces x for Group. SGID on a directory, is inhretied by all files within the directory.
Sticky bit: [s] replaces x for All
User ID [UID]
Real ID: ID defined within /etc/passwd.
Effective ID: Normally equal to their real ID, however when executing a process as another user, the effective ID is set to that user’s real ID. The effective ID is used in most access control decisions to verify a user, and commands such as whoami use the effective ID.
Saved ID: Used to ensure that SUID processes can temporarily switch a user’s effective ID back to their real ID and back again without losing track of the original effective ID.
Sharing Files with Vmware and Windows Host
sudo apt-get install linux-source
sudo apt-get install open-vm-tools
sudo vmhgfs-fuse .host:/ /mnt/ -o allow_other -o uid=1000
cd /mnt/hgfs
Last updated