Page 1 of 1

Installing in a symlinked directory

Posted: Mon Nov 19, 2007 7:53 am
by kibenaps
I like to deploy sites by keeping two http root directories under my vhost directory and pointing a symlink to the current one. Suppose apache is looking for httpdocs as the document root; then the vhost directory contains directories httpdocs1 and httpdocs2, as well as a symlink httpdocs pointing at httpdocs1. If I want to roll out new versions of software or whatever, I can install the site in httpdocs2 and, when I'm ready, atomically repoint the symlink to httpdocs2 using perl's rename function.

But for some reason, I cannot install serendipity in such a directory (I should point out here that I install it in the document root, that is, in httpdocs1/ rather than in httpdocs1/serendipity as would be default). This is the sequence: I already have serendipity running in httpdocs1, then I extract serendipity into httpdocs2, repoint the symlink, and visit the site to run the install script. I fix all the database settings and whatever, and try to save my changes. I get a message about not being able to write to archives/ . Ok, so I create archives/ and chmod it according to the message. Then the script fails to write to .htaccess, so I paste into .htaccess directly and save it, again according to the message. Then I try to visit my blog, but find that none of the setup actually happened, so I have to do it again, which needless to say plays out exactly the same way.

So it's a permissions problem, right? Except I've already done chmod 1777 on httpdocs2. I've tried chown'ing it to 'nobody', which doesn't work either. In short, it doesn't work specifically because of the symlink - without that, if I do the same procedure, same permissions and everything, but in a directory httpdocs rather than in the symlinked directory, it works fine. I've given the symlink the same permissions and ownership as the target directory, to no avail.

I suspect this is a very simple and intolerably newbie question, but the forum didn't seem to contain any posts about it; neither did the FAQ have anything to say. Thanks for your thoughts!

Re: Installing in a symlinked directory

Posted: Mon Nov 19, 2007 9:21 am
by garvinhicking
Hi!

Which paths do you enter in your configuration? httpdocs1 or httpdocs?

Seems to me as if s9y gets confused with your symlinks and is not allowed to write into the target directory. serendipity_config_local.inc.php needs to be writable in the directory you install s9y into.

Remember that the path you enter in the configuration needs to reflect the ACTUAL path where s9y lies in (can be a symlink), not a path where the s9y files are not yet liying in.

HTH,
Garvin

Posted: Tue Nov 20, 2007 1:39 am
by kibenaps
Thanks - that was it. I just changed the install path to httpdocs1 instead of httpdocs and it worked fine.