LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   WordPress issue - could not copy file (https://www.linuxquestions.org/questions/linux-server-73/wordpress-issue-could-not-copy-file-4175528883/)

punt 12-20-2014 06:40 PM

WordPress issue - could not copy file
 
I posted this to the WordPress forums a few days ago with no response, so I'm trying here.

I have Fedora 21 running on a local box with a Workstation install (plus a bunch of packages I installed via yum manually) and am now on my local blog update. I am trying to either do a one click upgrade of WordPress or a new plugin install and consistently get the following error:

Code:

Could not copy file. akismet/wrapper.php
The file name is never the same.

For example, here's what I get if I rerun the code:

Could not copy file.
Code:

akismet/_inc/img/logo-full-2x.png
I realize the files are being stored to upgrade/akismet.tmp (or whatever other folder there is). The files are being created to that folder.

I set the permissions to 777 there. Heck, I got so desperate that I set the permissions of the ENTIRE WordPress directory recursively to 777. And I still got that error.

My wp-config file has FTP declared properly. I also changed FS_METHOD per other WordPress forum suggestions. ftpsockets doesn't work at all for me (it won't connect to the ftp), and direct/ftpext both connect but fail in the way I described earlier.

I see no errors anywhere; WP debug was on and no errors were thrown. Nothing is in Apache's error_log etiher.

I have full access to this server. If I have to change some variable in php.ini or whatever, I am open to doing so. php.ini is still running its default values, so there's a lot that could be done there. I just need to figure out what it is that I need to do, because I pored through all similar reports of this issue and it was either a permissions issue or some sort of FS_METHOD issue and neither is the case for me.

Anyone know what this could be or how to find out more info?

sag47 12-20-2014 09:15 PM

Setting perms to 777 recursively is almost never a good solution. Some programs (like OpenSSH) require some files to have specific permissions to operate. It sounds like an selinux issue. See if selinux is enabled.

Code:

getenforce
If it is enabled then your issue likely lies in files being the wrong selinux context or sebools (selinux settings) not being properly set. You can try to temporarily disable selinux and test.

Code:

setenforce 0
If it appears to work after that then you have incorrect selinux settings. For troubleshooting tips and setting up selinux correctly search "selinux" in my blog. You should see the tips on audit2allow with audit.log. Here's a relevant post. http://www.linuxquestions.org/questi...oxypass-34305/

See also man selinux and man httpd_selinux. The man pages are a good resource. Don't forget to re-enable selinux.

Code:

setenforce 1

punt 12-20-2014 10:07 PM

SELinux is disabled. I don't use it at all.

And I only did the recursive 777 for testing. It was never intended as a temporary or even permanent solution. In short, it told me that the issue has nothing to do with permissions.

Any other ideas?

punt 12-21-2014 11:19 AM

Bump for any other suggestions please :)

punt 12-22-2014 06:52 AM

Still hoping someone can help with this! Thanks.

imadsani 12-22-2014 07:12 AM

Try adding the following to the wp-config.php file
Code:

define('FS_METHOD', 'ftpsockets');
Possible fix from this link: https://wordpress.org/support/topic/...e-upgrade-fail

Note: Backup your site before making any changes

punt 12-22-2014 07:47 AM

Thanks imadsani - I already mentioned in the first post that I tried that without any success. The FTP doesn't connect when I do that. It only works with ftpext/direct, but then it fails in the method described earlier.

I pored through all the WordPress.org posts already; nothing there seems to help.

imadsani 12-22-2014 07:53 AM

Long shot, but you could try another ftp server.

This may sound stupid, but have you checked whether you have diskspace available?

[b]Also, try changing the owner of wordpress recursively to apache:apache. I know I'm asking you to throw everything but the kitchen sink, but something's got to stick.

punt 12-22-2014 08:27 AM

It's a brand new machine with plenty of space. I don't want to try another FTP server. I want to figure out why it's not working. I know other FTP servers are fine...

And I already tried apache:apache. I also tried the FTPuser:apache. The permissions, again, aren't the issue.

I know something has to stick but it's gotta be something I haven't thought of already :)

punt 12-22-2014 05:11 PM

Anything else along the lines of SElinux?

punt 12-24-2014 12:56 PM

Bump again for other ideas. Really open to anything I haven't tried already...

punt 12-26-2014 08:17 AM

Another post holiday bump since I remain clueless and need to try something else.

punt 12-27-2014 10:33 PM

So is anyone reading this and is just clueless, or do you guys have anything for me to try? :)

astrogeek 12-27-2014 11:17 PM

Reading, but clueless, if that makes you less lonesome... ;)

punt 12-28-2014 01:06 AM

Quote:

Originally Posted by astrogeek (Post 5291404)
Reading, but clueless, if that makes you less lonesome... ;)

haha it does, thanks :)


All times are GMT -5. The time now is 02:44 AM.