D
D
DeniSidorenko2021-01-26 17:34:21
ubuntu
DeniSidorenko, 2021-01-26 17:34:21

Ubuntu path to 403 Wordpress files?

Good afternoon, I installed the entire package required to work with shared hosting. Installed WP. Everything works fine, but the get_template_directory_uri function, which should insert the path to the folder with the files, inserts
127.0.1.1/wp-content/themes/themename/img/img.png
And the path is correct, but they do not load and the console has a 403 forbidden error.
The files are in /var/www/wordpress/wp-content/themes/themename/img/img.png
The most important thing is that I gave permission to this folder, because I can edit, create, and delete files through phpstorm. I don't think it's right

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yuriev, 2021-01-26
@DeniSidorenko

  1. adequate advice sounds something like this:
    nginx/apache2/php-fpm or whatever works for you there with the same rights as the owner user?
    reduce everyone to one user (on whose behalf you work so that the storm can edit)
  2. bad advice, how not to act
    on all files, set the rights to 777, and to directories 666
    find /var/www/wordpress/ -type f -exec chmod 666 {} \;
    find /var/www/wordpress/ -type d -exec chmod 777 {} \;

  3. if you did as in advice 2, then return everything back
    find /var/www/wordpress/ -type f -exec chmod 644 {} \;
    find /var/www/wordpress/ -type d -exec chmod 755 {} \;
    and see tip 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question