Jump to content

Upgrade to 1.6.1.11 not possible: Directory /home/www/jamanda/shops/presta/ is not writable


Recommended Posts

Hello,

 

I urgently need some help, because my problem is strange and prevents from further updating my shop.

I was able to auto-upgrade my shop up to version 1.6.1.7. ( I forgot with which version I've startet, but could be 1.5.x.x)

 

Now it is no longer possible to auto-upgrade the shop with 1-click-upgrade because of the error message in the auto-upgrade-checklist:

 

Your store's root directory is writable (with appropriate CHMOD permissions) disabled.gif Directory /home/www/jamanda/shops/presta/ is not writable

 

Here some important things:

- Prestashop is running within the environment of a provider, not on a Unix I have fully under control

- The directory stated in the error message is wrong. This directory does not exist. 

- The real directory is: /www/shops/presta

- The permissions on /www/shops = 777

- The permission on /www/shops/presta is 775, also for all subdirs...

 

My questions:

- Where does the wrong path come from and could that non-existing path cause the problem?

- I searched through all config file in /config and in the database table ps_configuration, but did not find this path in both .

 

How can I fix that problem, because I would like to upgrade to the latest version of 1.6

 

Thanks in advance.

Dieter

Link to comment
Share on other sites

  • 2 weeks later...

Hello Superstar,

 

thanks for helping me.

I've contacted my provider. They did some changes, so that everything (files, PHP, etc.) is running under one (my) user.

Therefore, the shop has all rights to everything.

So from a provider standpoint, it cannot be an issue.

 

Therefore I need to investigate, why the wrong directory is showed in the 1-click upgrade page.

Please, can anybody help me in explaining, where this pages is getting this piece of information?

 

I reviewed  all config php scripts which I've found, but I was not able to identify where this directory information comes from.

My guess is, that if I could change this path, it would work.

Because, as I said, this path is completely wrong and not physically accessible. And if software tries to use this path, it has to fail - now way arround.

So I think I need to change this.

 

Hope for your collective help. A pointer to the php script would be sufficient.

 

Thanks and best regards

Dieter 

Link to comment
Share on other sites

OK, here are some additonal informations.

I learned a bit programming of PHP.

This is what I did to figure out the problem:

 

1. Created a PHP file with the name defines_custom.inc.php within /www/shops/presta/config

This file is used at first if it is found.
 
2. Created this PHP code witin this file
<?php
/**
* Dieter Radler 
* my own try to bugfix one-click-upgrade problem
*/
 
/* different tries did not work */
define('_PS_ROOT_DIR_', '/home/www/jamanda/shops/presta');
 
try
{
$datei = fopen('AAAAAAAAAAAA.txt','w');
echo fwrite($datei, 'realpath bringt:'."\n");
echo fwrite($datei, realpath($currentDir.'/')."\n");
echo fwrite($datei, 'getenv bringt:'."\n");
echo fwrite($datei, getenv(_PS_ROOT_DIR_)."\n");
fclose($datei);
$file = fopen(realpath($currentDir.'/').'BBBBBBBBBBBB.txt','w');
if(!file_exists($file)) {
$error = fopen('EEEEERRRR.txt', 'w');
echo fwrite($error, 'na da ist wohl ein Fehler passiert');
fclose($error);
}
echo fwrite($datei, 'realpath in BBBB bringt:'."\n");
echo fwrite($datei, realpath($currentDir.'/')."\n");
fclose($datei);
 
}
catch (Exception $e)
{
 
}
 
?>
 
3. Refresh a page to execute the code.
Afile is created AAAAAAA.txt within /www/shops/presta/admin1904 (the admin part of the shop) and the error file is created EEEEEERRRRR.txt.
 
Output AAAAAAAA.txt:
“realpath bringt:
/home/www/jamanda/shops/presta/config
getenv bringt:
"
 
What does this mean?
- PHP Function realpath gets back the "wrong" path.
There is no way to create a file within this path, that is why the error file EEEEEERRRRR.txt is created.
And this is the reason why the autoupgrade page shows this error. This pages tries to create a file within this path and fails and shows the error.
It has nothing to do with permission itself, it tries to use a wrong path.
 
Now my questions?
- What to do? How to come arround this problem. I tried to set a different, fixed path, but than the shop does no longer work.
- I contacted the provider again, explaining the problem, not sure whether they can fix that
- Has anybody an idea that could help?
 
Best regards
Dieter
 
Edited by radler64 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...