Vasil Ivanov
Vasil Ivanov

Reputation: 91

Wordpress: Strange permission issue

all I struggle with one permission problem with my wordpress. As you can see

ls -la wp-content/themes/impreza/
total 144
drwxr-xr-x  9 root root  4096 Oct  7 16:49 .
drwxr-xr-x  4 root root  4096 Oct  7 11:21 ..
-rwxr-xr-x  1 root root   330 Oct  7 10:33 404.php
-rwxr-xr-x  1 root root   340 Oct  7 10:33 archive.php
-rwxr-xr-x  1 root root   339 Oct  7 10:33 author.php
-rwxr-xr-x  1 root root   349 Oct  7 10:33 comments.php
drwxr-xr-x  2 root root  4096 Oct  7 16:48 config
drwxr-xr-x  2 root root  4096 Oct  7 10:33 css
drwxr-xr-x 10 root root  4096 Oct  7 10:33 demo-import
-rwxr-xr-x  1 root root   337 Oct  7 10:33 footer.php
-rwxr-xr-x  1 root root   355 Oct  7 10:33 forum.php
drwxr-xr-x 15 root root  4096 Oct  7 10:34 framework
drwxr-xr-x  3 root root  4096 Oct  7 10:34 functions
-rwxr-xr-x  1 root root  1105 Oct  7 10:33 functions.php
-rwxr-xr-x  1 root root   337 Oct  7 10:33 header.php
-rwxr-xr-x  1 root root   359 Oct  7 10:33 header-shop.php
-rwxr-xr-x  1 root root   361 Oct  7 10:33 index.php
drwxr-xr-x  2 root root  4096 Oct  7 10:33 js
-rwxr-xr-x  1 root root   325 Oct  7 10:33 page.php
-rwxr-xr-x  1 root root 18970 Oct  7 10:33 screenshot.png
-rwxr-xr-x  1 root root   388 Oct  7 10:33 searchform.php
-rwxr-xr-x  1 root root   344 Oct  7 10:33 search.php
-rwxr-xr-x  1 root root   645 Oct  7 10:33 single.php
-rwxr-xr-x  1 root root   365 Oct  7 10:33 single-us_portfolio.php
-rwxr-xr-x  1 root root   288 Oct  7 10:33 style.css
-rwxr-xr-x  1 root root 15056 Oct  7 16:49 us-logo.png
drwxr-xr-x  3 root root  4096 Oct  7 10:34 vendor
-rwxr-xr-x  1 root root  4341 Oct  7 10:33 wpml-config.xml

in my themes folder everything is with equals permissions but I can't access them all. For example

NOT VISIBLE - http://www.aniabuchi.com/wp-content/themes/impreza/us-logo.png

VISIBLE - http://www.aniabuchi.com/wp-content/themes/impreza/screenshot.png

The theme itself has activeted, but when I've try to active the plugins it say also "Please adjust file permissions to allow plugins installation". This is my second wordpress installation and the only difference I've made is to use only one wp-contents folder

/* Default value for some constants if they have not yet been set
   by the host-specific config files */
if (!defined('ABSPATH'))
    define('ABSPATH', '/var/www/aniabuchi/');
if (!defined('WP_CORE_UPDATE'))
    define('WP_CORE_UPDATE', false);
    define('DB_HOST', 'localhost');
if (!defined('WP_CONTENT_DIR') && !defined('DONT_SET_WP_CONTENT_DIR'))
    define('WP_CONTENT_DIR', '/var/www/aniabuchi/wp-content');

Upvotes: 0

Views: 314

Answers (3)

Try this and check - it might do the trick:

# chmod 755 -R <path_to_your_webroot_folder>
# chown root:root -R <path_to_your_webroot_folder>

Upvotes: 0

Stephan
Stephan

Reputation: 581

You need to make sure the owner assigned to the files and directories is the web server user, otherwise wordpress will fail all plugin installations or updates regardless of file/folder permissions. On ubuntu/debian it's usually www-data, and on centos/rhel/fedora it's apache.

Upvotes: 0

harrrrrrry
harrrrrrry

Reputation: 14467

  1. try to make images 777 to see if you can access them.

  2. for plugin, you should check your "wp-content/plugins" folder permission, not themes.

Upvotes: 0

Related Questions