Sixth chapter Linux file permissions and directory configuration

Source: Internet
Author: User

Sixth Linux file permissions and directory configuration 6.1Linux user identity and user group record files

Each account can have multiple user group support

/ETC/PASSWD user Account

/etc/shadow account password

/etc/group Group account

6.2 Permissions

The rwx permissions of a file only involve constraints on the contents of the file

The RWX permissions for a folder only involve constraints on files under Folders

LS principle: According to the identity of the folder access, if the identity of the folder is r--, the result only returns the list of file names, if r-x, returns the list of file names and attributes.

This is the difference between a folder's X permissions (Access directory accesses directories, filenames and attributes) and R permissions (read contents in directory reads the directory structure table, the list of file names).

6.3Linux Catalog Summary

Three directories defined by FHS:

/system boot, restore, repair and other related

The root directory should be as small as possible for the application, guaranteeing performance

Application-installed software is best not with the same partition, the larger the partition into more data, the greater the chance of releasing errors

/usr shareable, can be partitioned over the network for sharing with other hosts

Non-volatile (recommended), system default software installation directory, similar to C:\Program files\

/var: documents that are normal and change with the system and software operations

/

/boot kernel file Vmlinuz

Configuration files required for power on

/boot/grub/Boot file

*/bin commands that can be manipulated in single-user mode

Commands related to the boot process

*/sbin commands that only root can use

These commands are required during the drive, including the commands required to power on, repair, and restore the system

*/etc system's main configuration file

/etc/init.d/default startup scripts for all services

/etc/xinetd.d/super Daemon Managing Profiles directory for each service

/ETC/X11 various configuration files related to x Window, especially xorg.conf this xserve configuration file

*/lib function library to be used when powering on

Library of functions called by/bin and/sbin commands

*/dev Device file

*/root is placed/down, not in/home, because the directory can have the root master folder if it is mounted in single-user mode and only mounts the root directory

/Home User Master folder

/media placing removable devices, such as removable hard disks, discs

/mnt can mount temporary devices as well as/media

/OPT provides catalogs for third-party software

/srv Some of the data directories that are required to be used by these services after the startup of some network services

/tmp Any user can access, store the general user or is executing the program temporarily places the file

#/lost+found This directory is a directory that is generated using the standard EXT2/EXT3 file system format, with the goal of placing some missing fragments in this directory when a file system error occurs

#/proc This directory is a virtual file system

Its data is placed in memory

does not account for any hard disk space

System kernel, process, external device status, network status, etc.

#/sys Ibid. 1, 2, 3

Kernel module information that is currently loaded

Hardware device information detected by the kernel

/usr

/usr/bin/commands that most users can use at ordinary times

/usr/sbin/commands that are not necessarily needed when the system is running properly

/usr/lib/function library, target file for application software

Executable files or scripts that are not commonly accepted by the general user

Some software provides special commands to set up the server

Header and include files (include) for the/usr/include/program language

/usr/share/Sharing files

/usr/src/General Source Code

/usr/src/linux/Kernel Source

/var

/var/lib/the data file to be used during the execution of the program itself to place the directory

Each software in this directory should have a separate directory

/var/run/Some programs or services start, place their PID on this

/var/cache/Some cache files that are generated when the application runs

/var/log/Logon Log information file

/var/mail/mail File

With/var/spool/mail/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.