Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using a CentOs server that managed with Plesk panel. All domains have different users. I have 2 different installation of WordPress. One is installed from FTP and the other one is installed from Plesk.

WP installed from FTP cannot be updated from admin panel of WP. The error is;

Downloading update from http://wordpress.org/wordpress-3.4.2-no-content.zip

Unpacking the update…

Could not copy files.

Installation Failed

WP installed from Plesk can be updated successfully from admin panel of WP. So I check the permissions and file ownership and did the same as WP installed from Plesk. But it doesn't fix the issue.

Any suggestion?

PS: I know how to update from FTP. PS2: I won't disable 'define('FS_METHOD', 'direct');'.

share|improve this question
add comment

2 Answers

Just because you have write access from the ftp user doesn't mean that the user Apache/PHP is running in has write access.

I'd advise you upgrade manually, or check your write permissions and ownership for whichever user Apache is running as on those files.

share|improve this answer
add comment
up vote 0 down vote accepted

I fixed the problem by changing file ownership to apache:apache

share|improve this answer
2  
This is not a secure fix. If the Apache process owns the files, then that means anybody with access to the apache process can edit your website. Which, on a shared hosting system, would be any user of the hosting system. The files should be owned by the user account who owns the site, not be owned by a process. If you're not willing to disable the direct filesystem access method, then there is no solution to your problem that maintains the security of the site. –  Otto Sep 22 '12 at 7:16
    
@Otto; You are right but the site is on a dedicated system. I own the server. –  borayeris Sep 22 '12 at 13:49
2  
Well, if you have that level of access to the server, then the correct solution would be to use suPHP or an equivalent method to make the PHP process run as the user that owns the files, not to put the files under the incorrect ownership. Alternatively, you could switch from using the direct method to the SFTP based method or similar. –  Otto Sep 22 '12 at 14:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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