• 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!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Thread Starter ACleanPlate

    (@acleanplate)

    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?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    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.

    Thread Starter ACleanPlate

    (@acleanplate)

    Ok, I added “define(‘FS_METHOD’, ‘direct’);” to wp-config, but it didn’t work. I’m still getting the update error.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What is the user ID under which your web server and PHP process(es) run?

    Thread Starter ACleanPlate

    (@acleanplate)

    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!

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    ps -ef |grep httpd or ps -ef |grep apache should give you the ID

    Thread Starter ACleanPlate

    (@acleanplate)

    Thanks! Looks like ‘nobody’. ‘Root’ also appears in the list, but only once.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    root is for the “base” httpd process. all it does is spin off web processes as needed.

    Thread Starter ACleanPlate

    (@acleanplate)

    Okay, so “nobody” then. Now that I’ve got this information, what do I do with it?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Update Error:’ is closed to new replies.