Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux file permissions chmod chown     - Java concurrent programming using the synchronized keyword ReentrantLock alternative primitive (Programming)

- How to install the client sqlplus under linux (Database)

- CentOS 7.0 running Docker kernel error solution (Server)

- Android will save the picture to see the album and timely (Programming)

- Configure the ASM process on Red Hat Linux 6.5 (Database)

- Linux operating system Samba server configuration and use (Server)

- iOS GCD multithreading simple to use (Programming)

- Spark and Hadoop comparison (Server)

- Linux, Eclipse flash back and reinstall the JDK methods (Linux)

- To configure Samba to share files with Windows under CentOS (Linux)

- PLSQL Developer synchronization table tools (Database)

- Commonly used Linux system camouflage method (Linux)

- How to Install Foreman under Ubuntu (Server)

- Oracle TAF Analysis (Database)

- grep search from files and display the file name (Linux)

- Android Studio Personalization (Linux)

- How to Install Puppet in the Ubuntu 15.04 (Server)

- Summary Linux bond of multi-interface load balancing (Linux)

- Use Markdown editor for document work under Linux (Linux)

- Analytical Ceph: handle network layer (Server)

 
         
  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:      
 
- CentOS 6.5 platform offline compile and install PHP5.6.6 (Server)
- Guide: Trickle restrict application bandwidth usage (Linux)
- Linux usage in echo (Linux)
- Linux Security and Optimization (Linux)
- On FreeBSD 10.2 Bugzilla how to install and configure Apache SSL (Server)
- Archive log file size and redo log file size relationship (Database)
- Java Concurrency -volatile keywords (Programming)
- Linux firewall rules example Extracts (Linux)
- mysqldump MySQL command-line tool (Database)
- Linear table with a Java implementation of the iterator (Programming)
- How to manage the time and date at systemd Linux systems (Linux)
- Binary search -Java achieve (Programming)
- How to view the Linux program or process used in the library (Linux)
- HBase Application Development Review and Summary of Series (Database)
- CentOS install Redis (Database)
- Thinking in Java study notes - initialization and cleanup (Programming)
- When Linux Detailed time zone and common function of time (Linux)
- Error: Unable to establish connection with FTP SFTP server (Server)
- Oracle11g Trigger Debugging Record Error: PLS-00201: identifier SYS.DBMS_SYSTEM 'must be declared (Database)
- The best tools and techniques to find data on a Unix system (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.