Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to set the read and write permission of lamp file in Ubuntu

Shulou Source: shulou.com Published: 2022-06-01 17:04:07 10月03日 Update

Ubuntu how to set lamp file read and write permissions, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Set read and write permissions for Ubuntu lamp files

After the LAMP build is installed, the default setting of the PHP network server root directory is: / var/www. Due to the security principle of the Linux system, the read and write permissions of files in the changed directory are only allowed by root users, so we cannot create new php files in the www folder, nor can we modify and delete them. We must first modify the read and write permissions of the / var/www directory. File permissions cannot be modified by right-clicking in the interface manager, so you have to execute the root terminal command: sudo chmod 777 / var/www. You can then write to the html or php file.

After reading the above, have you mastered the method of how to set the read and write permissions of lamp files in Ubuntu? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Files permissions contents methods more directories problems security helpless for this principles reasons commands security for this properties skills folders is on the server Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Microsoft MySQL Docker Linux