Directories and File Systems
Linux and Unix file systems are organised in a hierarchical, tree-like structure. The highest level of the file system is the / or root directory. In the Unix and Linux design philosophy, everything is considered a file - including hard disks, partitions and removable media. This means that all files and directories (including other disks and partitions) exist under the root directory.
For example, /home/jebediah/cheeses.odt shows the correct full path to the cheeses.odt file that exists in the jebediah directory which is under the home directory, which in turn, is under the root (/) directory.
Underneath the root (/) directory, there is a set of important system directories that are commonly used across most Linux distributions. The following is a listing of common directories that are directly under the root (/) directory:
/bin - important binary applications
/boot - files that are required to boot the computer
/dev - the device files
/etc - configuration files, startup scripts, etc...
/home - local users' home directories
/lib - system libraries
/lost+found - provides a lost+found system for files that exist under the root (/) directory
/media - mounted (loaded) removable media such as CDs, digital cameras, etc...
/mnt - mounted filesystems
/opt - provides a location for optional applications to be installed
/proc - special dynamic directory that maintains information about the state of the system, including currently running processes
/root - root user home directory, pronounced 'slash-root'
/sbin - important system binaries
/srv - provides a location for data used by servers
/sys - contains information about the system
/tmp - temporary files
/usr - applications and files that are mostly available for all users to access
/var - variable files such as logs and databases
Permissions
All of the files on a Linux system have permissions that allow or prevent others from viewing, modifying or executing them. The super user "root" has the ability to access any file on the system. Each file has access restrictions, user restrictions and have an owner/group association.
Every file is secured by the following three sets of permissions:
user
applies to the user who is the owner of the file
group
applies to the group that is associated with the file
other
applies to all other users
Inside each of the three sets of permissions are the actual permissons. The permissions, along with the way they apply differently to files and directories, are outlined below:
read
files can be displayed/opened
directory contents can be displayed
write
files can be edited or deleted
directory contents can be modified
execute
executable files can be run as a program
directories can be entered
To view and edit the permissions on files and directories, open the &home-folder; and right-click on a file or directory. Then select Properties. The permissions exist under the Permissions tab and allow for the editing of all permission levels, if you are the owner of the file.
To learn more about file permissions in Linux, read the file permissions page in the Ubuntu Wiki.