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

Hide div in HTML Hide table TABLE or DIV content css style

I solved a problem tonight that has been botherin...

The pitfall of MySQL numeric type auto-increment

When designing table structures, numeric types ar...

Loading animation implemented with CSS3

Achieve results Implementation Code <h1>123...

MySQL FAQ series: When to use temporary tables

Introduction to temporary tables What is a tempor...

MySQL implements an example method of logging in without a password

Specific method: Step 1: Stop the mysql service /...

Solve the problem of running hello-world after docker installation

Installed Docker V1.13.1 on centos7.3 using yum B...

Using css-loader to implement css module in vue-cli

【Foreword】 Both Vue and React's CSS modular s...

Introduction to query commands for MySQL stored procedures

As shown below: select name from mysql.proc where...

Tutorial on using Multitail command on Linux

MultiTail is a software used to monitor multiple ...

Sample code for a simple seamless scrolling carousel implemented with native Js

There are many loopholes in the simple seamless s...

Several principles for website product design reference

The following analysis is about product design pr...

Detailed explanation of setting up DNS server in Linux

1. DNS server concept Communication on the Intern...

MySQL free installation version configuration tutorial

This article shares the MySQL free installation c...