Last update at :2023-12-30,Edit by888u
Sometimes there are file permission problems on the vps host that cause the website to be unable to be opened. Generally, most of them occur after the website is moved, and especially when the website is moved from a virtual space or windows to a Linux VPS, file permission problems will occur. Usually the directory All have 755 permissions, and the files have 644 permissions. I remember that when using virtual hosts in the past, it was really troublesome to modify file permissions one by one. If you use vps to have your own management permissions, you can use commands to modify them quickly and easily.
First, CD to the website directory you want to modify, and then run the following two commands to quickly modify permissions in batches.
find -type d|xargs chmod 755 find -type f|xargs chmod 644
In addition, sftp is often used to modify the root user group after uploading new files. It can be modified to the www user group. The command is as follows:
chown -R www:www /home/wwwroot/website directory
Pay attention to the parts marked in red. Everyone's configuration environment is different, and the road strength may be different. Please modify it according to your own road strength!
Recommended site searches: IP search, domain name registration official website, independent IP host, Tencent cloud server, virtual host service provider, Korean server recommendation, cloud server vps, German server, domain name reverse check, foreign website space,
发表评论