Your permissions here are missing the w permission. You can chmod 777 this directory and add write permissions. In ubuntu, your user is not root. This directory belongs to the root user, so your permissions are the last one. r-x does not have w permissions.
drwxrwxr-x
,从左到右第一个字母表示文件系统对象的类别,这里d
Represented as a directory (folder). Other file system objects:drwxrwxr-x
除出去第一个字母d
后的rwxrwxr-x
表示的是三种用户关系对文件或文件夹的操作权限。从左到右每三个一组,依次表示所有者权限、组权限、其他用户权限。每组的顺序均为rwx
,如果用户有相应的操作权限就用相应的字母表示,如果不具有相应的操作权限就用-
表示。比如:rwxrwxr-x
表示文件或文件夹的所有者具有rwx
(可读,可写,可执行)的操作权限,组用户也具有rwx
(可读,可写,可执行)的权限,其他用户具有r-x
(readable, executable, no readable) operation permissions.So the owner and group of the folder can be modified through
sudo chmod 777 -R /var/www/
修改其他用户操作权限或者sudo chown -R ubuntu:adm /var/www/
.Why
777
? You can refer to understand the operation permissions of Linux files and folderssudo chmod 777 -R /var/www/
Your folder is root. Choose one of the three commands chmod, chgrp, and chown to learn about it. Just use one.
Your permissions here are missing the w permission. You can chmod 777 this directory and add write permissions.
In ubuntu, your user is not root. This directory belongs to the root user, so your permissions are the last one. r-x does not have w permissions.