Detailed explanation of the solution to permission denied in Linux

Detailed explanation of the solution to permission denied in Linux

Permission denied:

The reason for this is: there is no permission to read, write, create files, delete files, etc.

Solution: Enter the command sudo chmod -R 777 /工作目錄,

For example: sudo chmode -R 777 /home/HDD , then you can perform a series of operations under this path.

sudo: It is a Linux system management command and a tool that allows system administrators to allow ordinary users to execute some or all root commands.

-R: refers to the application to all subdirectories and files in the directory;

777: refers to the highest authority that all users have.

But it is not convenient and not suitable for novices. The simple and rough method is as follows:

Enter in the command line

sudo passwd

It will prompt you to enter a new password. Re-enter the password, just enter the same as before. After success, enter

su root

Just enter the password again~

At this point you will find that the $ sign before the command you entered has changed to a # sign, which means you have succeeded.

The following are the additions from other netizens

hint

Permission denied

Solution:

// 777 permissions should be used with caution as it is a high permission
$ sudo chmod -R 750 a directory

in

-R means cascading to all subdirectories and files in the directory
750 means the file owner has read, write, and execute permissions, the file group has read and execute permissions, and other users have no permissions

Owner: rwx=4+2+1=7.
Group: rx=4+0+1=5.
Others: ---=0+0+0=0

Write, read, and execute permissions have the following numeric values:

r(read) = 4
w (write) = 2
x (executable) = 1
No permissions = 0

The permission number for a particular user class is the sum of the permission values ​​for that class.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Solution to the docker command exception "permission denied"
  • Solution to psql execution file permission denied
  • Quickly solve the Permission denied problem in PostgreSQL
  • Jupyter notebook adds kernel permission denied operations
  • Detailed explanation of Nginx 13: Permission denied solution
  • Solution to Permission denied in Python

<<:  JavaScript custom plug-in to implement tab switching function

>>:  jQuery implements accordion small case

Recommend

What are the rules for context in JavaScript functions?

Table of contents 1. Rule 1: Object.Method() 1.1 ...

Service management of source package installation under Linux

Table of contents 1. Startup management of source...

How to change $ to # in Linux

In this system, the # sign represents the root us...

MySQL trigger principle and usage example analysis

This article uses examples to explain the princip...

CSS to achieve the sticky effect of two balls intersecting sample code

This is an effect created purely using CSS. To pu...

Solution to the problem that the image name is none after Docker load

Recently, I found that after using the docker loa...

Solve the problem of yum installation error Protected multilib versions

Today, when installing nginx on the cloud server,...

Detailed installation tutorial of mysql-8.0.11-winx64.zip

Download the zip installation package: Download a...

Comprehensive summary of Vue3.0's various listening methods

Table of contents Listener 1.watchEffect 2.watch ...

A detailed discussion of MySQL deadlock and logs

Recently, several data anomalies have occurred in...

Summary of MySQL5 green version installation under Windows (recommended)

1 Download MySQL Download address: http://downloa...

Detailed explanation of Nginx timed log cutting

Preface By default, Nginx logs are written to a f...

Detailed Example of Row-Level Locking in MySQL

Preface Locks are synchronization mechanisms used...

MySQL 5.7.13 installation and configuration method graphic tutorial on Mac

MySQL 5.7.13 installation tutorial for Mac, very ...