Linux WordPress permissions after install
After the WordPress installation was not 403 Forbidden error, you need to go to the folder with the installed WordPress and change the owner of the folders and files.
Now run the following commands by root user:
chown www-data:www-data -R *
Notice: Where www-data it's your username and group directory, like this
chown username:group -R *
For all folders inside the WordPress directory, set permissions to 755
find . -type d -exec chmod 755 {} \;
755 ( drwxr-xr-x ) everyone can read this directory, but only the owner can change its contents
For all files inside the WordPress directory, set permissions to 644
find . -type f -exec chmod 644 {} \;
644 (-rw-r--r--) only the owner has read and write permission, group and others have read-only access