Home  >  Article  >  System Tutorial  >  Solution to Permission denied prompt when copying files in Ubuntu

Solution to Permission denied prompt when copying files in Ubuntu

王林
王林forward
2024-01-07 16:06:001772browse

The Ubuntu system prompts "Permission denied" when copying one file to another. This error message means that the permission is denied, which means that there is a problem with the permission to copy the file, so how to solve it? The editor below will bring you a solution to the problem that Ubuntu prompts Permission denied when copying files! Friends in need should go and have a look together!

Ubuntu复制文件时提示Permission denied的解决方法

1. On the surface, it seems to be due to insufficient permissions, so it can be solved by authorizing the usr folder:

zhengxiangwen@10:~$sudo chmod -R 777 usr

in

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

777 means that all users have the highest permissions

2. But the above solution only treats the symptoms but not the root cause. In fact, we need to enter the system as an administrator to have smooth access

Then the question is, how can I enter the system as an administrator? See below:

After Ubuntu is installed, the root initial password (default password) is not known and needs to be set.

1. First log in to the system with the user created when installing Ubuntu;

2. Then enter the command: sudo passwd and press Enter;

3. You will be prompted next: enter a new password, re-enter the password, and finally prompt you passwd: password updated successfully;

The setting of the root password has been completed at this time.

4. Then you can enter the command: su root;

That is, log in to the system as root. At this time, you can copy the files.

The above is the detailed content of Solution to Permission denied prompt when copying files in Ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete