0

I am unable to automatically install plugins or themes on my new wordpress setup. It gives me this screen:

enter image description here

I believe this is usually due to a write permission error on the wordpress directory. These are the steps I've done so far:

nginx as running under root user, with worker processes under nginx user:

# ps -ef | grep nginx | head
root     14197     1  0 07:46 ?        00:00:00 nginx: master process nginx
nginx    14198 14197  0 07:46 ?        00:00:00 nginx: worker process

PHP-FPM is running under root user, with worker processes under nginx user:

# ps -ef | grep php-fpm | head
root     14748     1  0 08:38 ?        00:00:00 php-fpm: master process (/etc/php-fpm.conf)
nginx    14749 14748  0 08:38 ?        00:00:00 php-fpm: pool www
nginx    14750 14748  0 08:38 ?        00:00:00 php-fpm: pool www
nginx    14751 14748  0 08:38 ?        00:00:00 php-fpm: pool www
nginx    14752 14748  0 08:38 ?        00:00:00 php-fpm: pool www
...

The root user is part of the nginx group:

# groups root
root : root nginx

The wordpress directory is owned by nginx:nginx and also 777 (both recursively):

# ls -l /var/www/
total 4
drwxrwxrwx. 5 nginx nginx 4096 Feb 24 06:45 wordpress

But none of this solves the issue. I'm unsure on what to check next. I'm on centOS 7 minimal.

closed as off-topic by HopelessN00b Feb 25 '15 at 7:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – HopelessN00b
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Note that Wordpress works via FTP on the filesystem, not directly. – sebix Feb 24 '15 at 10:07
  • 1
    Note that wordpress defaults to ftp if the owner of where it needs to write to is not "itself" (the webserver/php-fpm user). It is, a terrible idea to make your whole doc root owned-by/writable-to to the webserver user, and even more so because you've got it world writable. – AD7six Feb 25 '15 at 0:27
  • @AD7six ... and you don't mention ngingx and PHP running as root. Having the doc root as world writeable is tightly locked down by comparison. – TessellatingHeckler Feb 25 '15 at 6:01
  • @TessellatingHeckler the master process for both always runs as root (in almost all production-like use cases at least), the workers are running as the user nginx - see the ps output if the wording the question leaves any doubts. – AD7six Feb 25 '15 at 8:16
  • 1
    @AD7six Of course; I should pay more attention. How else could they open high privilege TCP ports, and launch processes as other user accounts. Oops. – TessellatingHeckler Feb 25 '15 at 8:22
1

You can add the following line to your wp-config.php file for direct filesystem writing:

define('FS_METHOD','direct');

Not the answer you're looking for? Browse other questions tagged or ask your own question.