Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux file permissions chmod chown     - Analysis JavaBean (Programming)

- Apple Mac computer to install Windows 10 Concise Guide (Linux)

- Oracle 11gr2 new APPEND_VALUES tips (Database)

- Linux Command Tutorial: Ubuntu apt-get command (Linux)

- Java string equal size comparison (Programming)

- Linux ldconfig command (Linux)

- Linux virtual machines to solve end MySQL database can not remote access (Database)

- Shuffle Process Arrangement in MapReduce (Server)

- VMware 8 installation configuration Win7, CentOS-7 Wizard (Linux)

- Linux firewall Iptables study notes (Linux)

- GNU Linux system variables (sysctl configuration commands) integrated use (Linux)

- Eclipse Android development environment installation (Linux)

- Ubuntu 15.04 and CentOS 7 to deploy .NET, Mono and DNX (Server)

- Installed in the desktop version of Ubuntu Unity Tweak Tool (Linux)

- Phoenix agents use P2P WebRTC development (Programming)

- View and modify Linux machine name (Linux)

- Linux Mint 17.2 64 bit installation Docker and management software seagull (Linux)

- Linux dual physical network card set to a virtual NIC (Linux)

- C ++ type conversion and RTTI (Programming)

- To change CentOS7 runlevel (Linux)

 
         
  Linux file permissions chmod chown
     
  Add Date : 2018-11-21      
         
         
         
  1. Linux file access permissions

chmod change mode is an abbreviation. Similarly chown is an abbreviation for change owner, is access to a file changes, a change in the owner of the file.

2. Change the file permissions chmod

Linux file concerned, access permissions and file owner is more important of the two properties. Access to files about such a concept. Such as access to files and 3, a read, read by said flag is 4, is a writing, with w, said flag is 2, and the other is x, flag is 1, that means executable (for a file, x represents the file can be executed, for a directory, x indicates the directory can be accessed, which can go cd). For a given user, if the mode value of a document is 7, then this indicates that the user has rwx file permissions. This is the bit operation, hoping to carefully understand what. Where 755 represents the owner of the file permissions are rwx (read and write access or execute), group_user permissions on this file is rx, others permissions on this file is rx (read and execute access).

chmod -R 755 *

We are usually listed a 3-digit number by ll command or ls -al, how this understanding it. This is the original, and this three-digit represent owner group_user others permissions on this file, the root causes of this shows that Linux is a multi-user operating system, a file can be different users see. Group_user and necessary to explain the concept in Linux, and users can group, and a group can turn multiple users, so that a document should be noted that these three types of user access to the file is considered complete, otherwise, when a file exposed to different types of users, the operating system how it will deal with this case? The above problems are basically file permissions, this knowledge, you can set the appropriate permissions to a file, if it is a directory, if you want to recursively set permissions for each file directory, you can use the -R argument .

3. Change the file attributes chown user group

Here is chown related content.

Each file has an owner, the owner is a user through a group and to jointly decide. If you do not know your identity, you can view by whoami. If you do not know your current group, groups can be used to view all the group.

These two scenarios are usually practical tools like this, you do not want to edit a file when always use sudo, this document does not need to be protected, one way is to access the file permissions set to 777, so that everyone It can be freely modified without any protection. But in another way the owner of the file is set to your current user, or that you want him to feel free to edit this file without any user restrictions. Thus for example,

chown -R work: work *.

This can be all files in the current directory are set to work work, the first work is the user name, the second is the user group. Under normal circumstances is the same. If you are not sure, you can touch a file, then ls -al, so look for new files are listed and the user group, set the same, you can always cancel the password input trouble.
     
         
         
         
  More:      
 
- Build ftp server under CentOS 6.5 (Server)
- Java generate two-dimensional code by Zxing (Programming)
- Ubuntu install Scala 2.10.x version (Linux)
- Linux System Getting Started Learning: complete installation on Debian or Ubuntu kernel source (Linux)
- Using Python multithreaded mistakes summary (Programming)
- Linux Security and Optimization (Linux)
- Linux, Apache Web site security settings (Linux)
- Configuring ftp server and nfs server under Linux (Server)
- Oracle 11g principle study Dataguard (Database)
- Ubuntu 10.10 install Oracle 10g graphic tutorials (Database)
- Java string intern constant pool resolution Introduction (Programming)
- VirtualBox 4.3 Can not open a new task for a virtual computer solution (Linux)
- Ubuntu and derived versions of the user how to install G Mic 1.5.8.5 (Linux)
- Ubuntu 14.04 and derivative version of the user on how to install cURL 7.37.1 (Linux)
- W and uptime command (Linux)
- Linux / Unix: chroot command examples to explain (Linux)
- Docker build their own private warehouses (Linux)
- Ansible module Know (Linux)
- Python in os.path Magical (Programming)
- OpenGL Superb Learning Notes - Fragment Shader (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.