Unpacking the update… Could not create directory.

2019-03-15 13:20发布

When I instal nextgen-gallery plugins. This error message appears

Downloading update from https://downloads.wordpress.org/plugin/nextgen-gallery.zip…

Unpacking the update…

Could not create directory.

How can I fix this problem ?

10条回答
走好不送
2楼-- · 2019-03-15 14:11

for nginx people
if you have php-fpm installed you have to tell it that its user and group is nginx. /etc/php-fpm.d/www.conf . find user which is assigned to apache by default and change it to nginx. also do it for group. then run this command :

sudo service php-fpm restart


also inside of your wordpress directory execute these commands

sudo chown nginx:nginx * -R 
sudo usermod -a -G nginx username

change username into what your current username is.

yet you have to apply propper permissions. run these commands inside your wordpress directory

sudo find . -type f -exec chmod 664 {} + 
sudo find . -type d -exec chmod 775 {} +
查看更多
做自己的国王
3楼-- · 2019-03-15 14:11

(Re)setting the permissions via ftp didn't make a difference for me either. There is no SSH available, so I had to log in the control panel (directadmin in my case), the File Manager where I could "Reset Owner" to "File ownership reset" the /wp-contents directory.

查看更多
Evening l夕情丶
4楼-- · 2019-03-15 14:11

I'm running Nginx with Wordpress. I deleted the upgrade folder in wp-content and then ran the upgrade from the wordpress GUI again. I noted the linux user for the upgrade folder created was www-data. I then did a {sudo chmod -R www-data:www-data .} Ran the upgrade again from the GUI and it worked.

Probably need to change the permissions on most of the folders so they can't be modified by www-data but I'll figure that out tomorrow.

查看更多
Anthone
5楼-- · 2019-03-15 14:11

A permission issue, make sure apache (www-data) has write permissions.

查看更多
登录 后发表回答