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

Correct modification steps for Docker's default network segment

background A colleague is working on his security...

Solutions to common problems using Elasticsearch

1. Using it with redis will cause Netty startup c...

How to quickly import data into MySQL

Preface: In daily study and work, we often encoun...

How to implement on-demand import and global import in element-plus

Table of contents Import on demand: Global Import...

User needs lead to marketing-oriented design

<br />For each of our topics, the team will ...

Getting Started Tutorial for Beginners ④: How to bind subdirectories

To understand what this means, we must first know ...

MySQL daily statistics report fills in 0 if there is no data on that day

1. Problem reproduction: Count the total number o...

Which one should I choose between MySQL unique index and normal index?

Imagine a scenario where, when designing a user t...

Tutorial on installing MySQL8 compressed package version on Win10

1 Download MySQL8 from the official website and i...

Three ways to create a gray effect on website images

I’ve always preferred grayscale images because I t...

How to block and prohibit web crawlers in Nginx server

Every website usually encounters many non-search ...

Implementing simple chat room dialogue based on websocket

This article shares the specific code for impleme...