Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Unable to move download directory up one level

Unable to move download directory up one level

Locked

Views: 2,521

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
30 Dec 2009, 3:43 AM
#1
rachalmers avatar

rachalmers

New Zenner

Join Date:
Mar 2008
Posts:
55
Plugin Contributions:
0

Unable to move download directory up one level

Zen Cart 1.3.8a
Database Patch Level: 1.3.8
MYSql PHP on Linux hosting service.

I can not get the system to recognize the changed download directory location. It says it doesn't exist.

I followed the instructions in the tutorial section. "How do I relocate my download directory outside my webroot....."

From configure.php in two places. includes, and admin/includes.

define('DIR_FS_CATALOG', '/usr/local/pem/vhosts/163130/webspace/httpdocs/quantum/audio_zen/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

Ok, so I changed this line - in both files - above to:
define('DIR_FS_DOWNLOAD', '/usr/local/pem/vhosts/163130/webspace/httpdocs/download/');

which is where the directory should live.

The SystemInfo option points out the path as well,
_ENV["ORIG_PATH_TRANSLATED"] /usr/local/pem/vhosts/163130/webspace/httpdocs/quantum/audio_zen/admin/server_info.php

I do own httpdocs, having a working web site there.

So I'm stumped actually. Will it do it or won't it?
I guess it's not 100% necessary, but would be a bit of a help.

I've searched the entire internet, and while I find this talked about a lot, no actual solutions seem evident?

Thanks anyone

30 Dec 2009, 4:54 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unable to move download directory up one level

The tutorial is correct, and has worked perfectly every time I've used it.

I'm guessing that Apache/PHP doesn't have permission to read the folder; hence the error message to that effect.

30 Dec 2009, 5:25 AM
#3
rachalmers avatar

rachalmers

New Zenner

Join Date:
Mar 2008
Posts:
55
Plugin Contributions:
0

Re: Unable to move download directory up one level

Yes, I figured this had to be the case. Something like this anyway. But how do I solve that? I'm on a hosting provider, but however. I am the owner (user?) of the whole tree.
webspace/httpdocs/ is actually the home of a web site of mine, and the one where I have zen is below that, in quantum. Yet another website. Hmmmm - how do I explain that.
Website one. httpdocs/
Website two. httpdocs/quantum/ --> zen directory.

So I figured it would be easy to put 'downloads' into httpdocs.

Also, if it's actually the physical path that it's referring to, it shouldn't matter to Apache should it?
/usr/local/pem/vhosts/163130/webspace/httpdocs/download/

The error is telling me the download directory doesn't exist, not that it doesn't have permission.
Anyway - very strange. And apparently no way of finding out what the problem is.
Thanks anyway.

30 Dec 2009, 5:28 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unable to move download directory up one level

Yes, but if for some reason its existence is being undetectable because of a permissions problem or misspelled foldername ... then that's what it's going to tell you.

30 Dec 2009, 5:38 AM
#5
rachalmers avatar

rachalmers

New Zenner

Join Date:
Mar 2008
Posts:
55
Plugin Contributions:
0

Re: Unable to move download directory up one level

Ah. Ok. I see. I guess I will have to try and discover why it has no permissions to physically look up one level in the tree.

Hmm, to put it another way. If it can see into
/usr/local/pem/vhosts/163130/webspace/httpdocs/quantum/audio_zen/

why cant it see into

/usr/local/pem/vhosts/163130/webspace/httpdocs/download/

Download is set to 755 by the way.

Don't know. Back to the drawing board I suspect. Trust me to have the only hosting company in creation that has something odd in place.

30 Dec 2009, 7:28 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Unable to move download directory up one level

An aside comment ... moving the download folder to just another folder under the httpdocs folder still makes it fully accessible by browsers and thieves.
Generally speaking, one would want to move it above the webroot (in your case httpdocs).

But that's unlikely to make any difference with respect to the problems you're encountering at present.

Did you happen to make sure you made your configure.php files writable before editing the folder path? And then make them read-only again afterwards? If you didn't do that, then your changes won't be getting saved on the server ... which of course makes the error message legitimate.

30 Dec 2009, 8:09 AM
#7
rachalmers avatar

rachalmers

New Zenner

Join Date:
Mar 2008
Posts:
55
Plugin Contributions:
0

Re: Unable to move download directory up one level

Thanks, yes, done all that. Unset permissions, edit, reset.

The way the hosting is set up, someone trying to get to the download directory would actually have to go to an entirely different website. Odds are about .. uncountable of them guessing the right one.

In any case, I believe that to be a red herring. The config script is apparently looking at the True Path .... now that has to be a pun...
/usr/local/pem/vhosts/163130/webspace/httpdocs/download/

and not seeing the directory? Which is unexplainable so far.
I'll get back to it tomorrow and see if I can root out the cause.
Looking at the web log files is a pain. Hard to get to. oh well

I might just leave it all where it is and trust in the good old .httpaccess and index file.

Thanks for the help though. Much appreciated.

30 Dec 2009, 8:54 AM
#8
ukecom avatar

ukecom

New Zenner

Join Date:
Dec 2009
Location:
UK
Posts:
11
Plugin Contributions:
0

Re: Unable to move download directory up one level

Yes normally such problems are caused when files and folders have nobody ownership.

Make sure the ownerships are changed to user ownership.

30 Dec 2009, 9:07 AM
#9
rachalmers avatar

rachalmers

New Zenner

Join Date:
Mar 2008
Posts:
55
Plugin Contributions:
0

Re: Unable to move download directory up one level

Thanks, I'll look into that.

31 Dec 2009, 1:34 AM
#10
rachalmers avatar

rachalmers

New Zenner

Join Date:
Mar 2008
Posts:
55
Plugin Contributions:
0

Re: Unable to move download directory up one level

Mea culpa. Mea maxima culpa.
You are not going to believe this. :no::oops:

As I said, rattling on above ..... it was a path matter.
It was. The NEW directory is SUPPOSED to be called /download ....
NOT /downloads

Sorry for the confusion folk, and thanks for the advice, even though teaching me to read might have been the best bit of advice.

I can't actually create the directory in the parent of httpdocs without begging the Hosting Provider, and I don't need the drama at this stage. So I'm happy with it were it is, which is outside the webroot of the site anyway.

so yep. Working.

31 Dec 2009, 4:15 AM
#11
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,640
Plugin Contributions:
0

Re: Unable to move download directory up one level

Than you for posting what happened. We have all done similar things and perhaps this will help someone else running into the same problem.