Update Error:
-
Here is the error I receive when I try to update a plugin or theme:
Update Failed: The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.
I have done a manual reinstall of WordPress and changed all of my folder permissions to 775 to no effect. I think the problem might have started when I hooked up Vaultpress via SSH, but that’s just my best guess, and removing Vaultpress hasn’t helped, either. Neither has my host. One of the suggestions I’ve come across in my search is to use the following command to change file ownership:
sudo chown -R username:group .
However, I have no idea how to find the correct username or group. The command “cat /etc/group” was suggested, but shows dozens of options. Can anyone explain the username:group command in greater detail to help me narrow it down, or offer another possible solution?
Thank you so much!
-
see https://codex.wordpress.org/Editing_wp-config.php#Override_of_default_file_permissions and enable FS_DIRECT
So, if I have understood correctly, this is supposed to be added to wp-config:
define(‘FS_METHOD’,’direct’);
define( ‘FS_CHMOD_DIR’, ( 0755 & ~ umask() ) );
define( ‘FS_CHMOD_FILE’, ( 0644 & ~ umask() ) );However, it didn’t work. Changing WordPress file permissions to 777 seems to work, but I understand that’s not something you want to leave in effect long-term, so I reset them all to default. Is there a particular WP file that might cause this issue?
777 is insecure and should not be used. All you need is the first line FS_METHOD. Files and directories should be owned by the userid of your web server/php process.
Ok, I added “define(‘FS_METHOD’, ‘direct’);” to wp-config, but it didn’t work. I’m still getting the update error.
What is the user ID under which your web server and PHP process(es) run?
I don’t know. I found guides to put “lsof -i”, “cat /etc/group”, or “cat /etc/passwd” into SSH to show the list, but don’t know how to tell which one is/should be the right one. My host couldn’t tell me. www-data and apache seem to be common ones, but neither shows up on my list.
I appreciate all of your help, Steve!
ps -ef |grep httpdorps -ef |grep apacheshould give you the ID-
This reply was modified 9 years, 4 months ago by
Steven Stern (sterndata).
Thanks! Looks like ‘nobody’. ‘Root’ also appears in the list, but only once.
root is for the “base” httpd process. all it does is spin off web processes as needed.
Okay, so “nobody” then. Now that I’ve got this information, what do I do with it?
-
This reply was modified 9 years, 4 months ago by
The topic ‘Update Error:’ is closed to new replies.