Linux cannot upload files

王林
王林Original
2020-02-14 15:56:384752browse

Linux cannot upload files

Problem:

Unable to upload files to the Linux host.

For example: We now want to upload file A to the /opt/software directory, but at this time we find that it cannot be uploaded.

[isea@redis99 software]$ ll
总用量 4664
-rw-r--r--. 1 root root 1547237 10月 28 07:25 redis-3.2.8.tar.gz
-rw-r--r--. 1 root root 3226139 10月 28 07:25 ruby-gems.tar.gz

Reason:

We use the isea user when connecting remotely, so we cannot download content to the root folder.

Recommended related video tutorials: linux video tutorials

Solution:

1. Use the root account to connect and then upload;

2. Modify the owner of the /opt/software directory and then upload it.

[isea@redis99 opt]$ sudo chown -R isea:isea /opt/module/ /opt/software/ 
[isea@redis99 opt]$ ll 
总用量 8
drwxr-xr-x. 3 isea isea 4096 10月 28 07:27 module
drwxr-xr-x. 2 isea isea 4096 10月 28 07:27 software

If the root permissions of a general user are not configured, you can switch to the root user.

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Linux cannot upload files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn