Problem trying to upgrade script

Biddango

Registered
Jan 7, 2010
1
0
51
Hi, I did a search for this issue and was unsuccessful finding the exact same problem, so forgive me if I missed it...

I get an email every night that a software script needs upgrading. It is for wordpress, and it says that I have 2.8.5 and need to upgrade to 2.9.2. When I click on the link in the email (and log in), it comes to a screen that states this:

"Could not prepare working directory: No such file or directory"

I get the same thing if I go in through the normal manner of cpanel - software scripts - wordpress - upgrade.

Does anyone have an idea what causes this? and how can I get it corrected?

Thanks!
 

YasminTiara

Member
Mar 18, 2010
5
0
51
great job. I had been looking and thinking about compiling a script to get this done for a while, but never came around. Im glad you finally did, its mid stream right now, but I've been following it closely and it looks like it will be flawless. great job! thanks!
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
10
313
Houston, TX
cPanel Access Level
Root Administrator
If anyone here has root access to the cPanel/WHM server, feel welcome to contact our technical analysts.

If you are not the server administrator, please have your web hosting provider contact us so we can work with them to diagnose and resolve this issue.
 

rachelm

Well-Known Member
Verifed Vendor
Jan 26, 2005
94
1
158
best solution I found was to do the following:

#1 Make sure the wp-content/upgrade folder exists

#2 chmod it to 777

#3 do the upgrade from within the wp admin area

#4 chmod wp-content/upgrade back to 755

Problem is usually that the upgrade folder needs to be chmod 777 in order for WP to access the files and move them around, then chmod back to 755 afterward to ensure security.

No idea why WP hasn't coded this into their upgrade routine on their own but took me ages to figure it out lol.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
10
313
Houston, TX
cPanel Access Level
Root Administrator
best solution I found was to do the following:

#1 Make sure the wp-content/upgrade folder exists

#2 chmod it to 777

#3 do the upgrade from within the wp admin area

#4 chmod wp-content/upgrade back to 755

Problem is usually that the upgrade folder needs to be chmod 777 in order for WP to access the files and move them around, then chmod back to 755 afterward to ensure security.

No idea why WP hasn't coded this into their upgrade routine on their own but took me ages to figure it out lol.
Just a head's up, chmoding to 777 will break scripts on systems running SuPHP since SuPHP does not allow scripts with such insecure permissions to run on the server.
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,134
1
168
New York
best solution I found was to do the following:

#1 Make sure the wp-content/upgrade folder exists

#2 chmod it to 777

#3 do the upgrade from within the wp admin area

#4 chmod wp-content/upgrade back to 755

Problem is usually that the upgrade folder needs to be chmod 777 in order for WP to access the files and move them around, then chmod back to 755 afterward to ensure security.

No idea why WP hasn't coded this into their upgrade routine on their own but took me ages to figure it out lol.
We are having the same issues. If we run it from the clients account with their username and password we ge the

""Could not prepare working directory: No such file or directory""​

stuff. If we do the steps you list above then go to the WP admin and I click update to 2.9.2 in the wordpress admin I get:

You do not have sufficient permissions to access this page.​

If I go to the WHM control panel and try to do it from manage addons I get:

Upgrading xxxxxxxxxx cPanel::Blogs::WordPress.0.yaml installation here...

cPAddon cPanel::Blogs::WordPress
This is a cPanel packaged module. (v0.4)

Website WordPress › Blog Tool and Publishing Platform

but it doesnt do anything else.

I am stumped and my customers are furious that they cannot upgrade WP and the one that is there doesnt seem to be supporting the plugins that are coming out now.
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
Just a head's up, chmoding to 777 will break scripts on systems running SuPHP since SuPHP does not allow scripts with such insecure permissions to run on the server.
David, you beat me to the punch line! :) (was getting read to point out the same thing)

Anyway though David is correct ....

On phpSuExec (CGI w/ SuExec), SuPHP, or FCGI based servers you cannot have any file or folder setup with 777 permissions in your web space or you will at best slow down your site drastically and at worst crash your site completely with Error 500 conditions.

Everyone should keep in mind that anytime you see anyone say to use '777' permissions anywhere, they are **ALWAYS** referring to DSO based servers only (and even then it is still not particularly recommended)

Just for the record --> Use 755 instead of 777 with these other systems.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
10
313
Houston, TX
cPanel Access Level
Root Administrator
If I go to the WHM control panel and try to do it from manage addons I get:

Upgrading xxxxxxxxxx cPanel::Blogs::WordPress.0.yaml installation here...

cPAddon cPanel::Blogs::WordPress
This is a cPanel packaged module. (v0.4)​


Are you upgrading the installation available on the server (the "Install cPAddons" screen), or the individual installation on an individual account (the "Manage cPAddons" screen)?

Users can upgrade their own cPAddons by going into Site Software, selecting the software they want to upgrade and clicking the upgrade link at the bottom of the page (below the installation information form).​
 

ahmedshuja

Registered
Nov 12, 2010
1
0
51
If anyone here has root access to the cPanel/WHM server, feel welcome to contact our technical analysts.

If you are not the server administrator, please have your web hosting provider contact us so we can work with them to diagnose and resolve this issue.

I am my server's administrator and I can access WHM as root. No matter where I try to update Wordpress from (cpAddons, Site Software) I get what I have included in the attachment. What do I do?

- Ahmed
 

Attachments

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
10
313
Houston, TX
cPanel Access Level
Root Administrator
I am my server's administrator and I can access WHM as root. No matter where I try to update Wordpress from (cpAddons, Site Software) I get what I have included in the attachment. What do I do?

- Ahmed
If you are running an old version of MySQL (older than 5.0), you will need to upgrade to MySQL 5.0 or 5.1. Upgrading MySQL can be done through WHM by clicking on "MySQL Upgrade" in the Software section of WHM.

If you are running MySQL 5.0 or 5.1 and still see this, please let me know.
 

DimensionZero

Member
Jul 26, 2007
11
0
51
Vancouver, BC
Hi,

Looks like I'm having this problem with upgrading wordpress on a client's site. MySQL 5.0.91 is installed and I was able to upgrade from Wordpress 2.7 to 2.8, but after that I received the error, Could not prepare working directory: No such file or directory.

I've checked the permissions like others had mentioned earlier but those are fine as well so that doesn't seem to be the problem.

Any other ideas?

Update: I checked the cPanel error log and found this repeated about 6 times. I reset the mysql root password via WHM but still get this error.

Hope this helps
Code:
DBD::mysql::db do failed: Access denied for user 'root'@'localhost' to database 'carlecom\_%' at /usr/local/cpanel/Cpanel/Mysql.pm line 1093.
DBD::mysql::db do failed: Access denied for user 'root'@'localhost' to database 'carlecom\_%' at /usr/local/cpanel/Cpanel/Mysql.pm line 1093.
[2010-12-07 16:54:28 -0800] warn [mysqladmin] FAILED GRANT: GRANT ALL ON `carlecom\_%`.* TO 'carlecom'@'localhost' IDENTIFIED BY PASSWORD '(removed)'; at /usr/local/cpanel/Cpanel/Mysql.pm line 405
        Cpanel::Mysql::add_dbowner_to_all(Cpanel::Mysql=HASH(0x1d66e580), 'carlecom', '(removed)', 1) called at /usr/local/cpanel/Cpanel/Mysql.pm line 446
        Cpanel::Mysql::updateprivs(Cpanel::Mysql=HASH(0x1d66e580)) called at /usr/local/cpanel/bin/mysqladmin line 99
 
Last edited: