简体   繁体   中英

Do not have the write permissions on files |directories after wordpress migration from hostgator to lightsail

After migrating all the files in the public_html folder which i get from Hostgator to AWS Lightsail (bitnami wordpress pre-installed), even I still can login into /wp-admin with the old user name and password as well as seeing all the contents of the old website, I could not get the write permissons to the files for that user.

I am still having to the file permissons system set 775 for directory and 664 for files. I also set ftp method to direct in wp-config.php file.

If I set the folder permisson to 777, i can edit the files within wp-admin. However, 777 will make it more vulnerable to be attacked by hackers.

What should I do to obtain the write permissons for files and directories for my wordpress admin user?

Thank you very much.

Bitnami developer here. You can set the WordPress permissions and owner in the following way:

sudo chown -R bitnami:daemon TARGET
sudo find TARGET -type d -exec chmod 775 {} \;
sudo find TARGET -type f -exec chmod 664 {} \;
sudo chmod 640 TARGET/wp-config.php

Replacing TARGET with path to the WordPress folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM