Re: [AOLSERVER] Symbolic links and directoryfile
Hi Ellen, Seems to work fine for me. I created a softlink in the top level in my webspace: the /aolserver softlink should take me to webtools/opennsd, and it does: atlas-scott> ln -s webtools/opennsd aolserver Then I create a softlink within webtools/opennsd that points further down: atlas-scott> cd webtools/opennsd/ atlas-scott> ln -s modules/nsopenssl gomore I was able to then go to: http://192.168.0.2/aolserver/gomore and end up on the correct page. (192.168.0.2 is my home test server). So it followed the first link, and then the second link successfully. I know this sounds crazy, but ls -la your link to make sure it really is pointing to where you think it is. Maybe you linked to a relative path incorrectly, or you linked to the absolute path rather than the path relative to the pageroot. /s. -Original Message- From: AOLserver Discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Ellen Spertus Sent: Sunday, August 19, 2001 2:51 PM To: [EMAIL PROTECTED] Subject: [AOLSERVER] Symbolic links and directoryfile Do symbolic links interact properly with directoryfile under Aolserver 3.2? Specifically, I use the default values for directoryfile (index.adp, index.html, index.htm). In general, when I request "http://javamlm.mills.edu/.../";, I get the index.html file. I have a symbolic link to a directory called pipermail, which contains a symbolic link to directory test1, which contains a file called index.html. (This is part of the standard mailman installation.) When I request "http://javamlm.mills.edu/pipermail/test1/";, I get a Server Error, although "http://javamlm.mills.edu/pipermail/test1/index.html"; works perfectly. The directory does not contain any other index.* files, and the permissions on the directory (drwxrwsr-x) seem correct. Any ideas? Ellen Spertus
Re: [AOLSERVER] Symbolic links and directoryfile
On 2001.08.19, Scott S. Goodwin <[EMAIL PROTECTED]> wrote: > I created a softlink in the top level in my webspace [...] > I was able to then go to: > > http://192.168.0.2/aolserver/gomore Can you hit this URL: http://192.168.0.2/aolserver/gomore/ (with the trailing slash) -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/
Re: [AOLSERVER] Symbolic links and directoryfile
Yes, I did that but neglected to mention it. I also did: http://192.168.0.2/aolserver/gomore/index.htm /s. -Original Message- From: AOLserver Discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Dossy Sent: Sunday, August 19, 2001 4:29 PM To: [EMAIL PROTECTED] Subject: Re: [AOLSERVER] Symbolic links and directoryfile On 2001.08.19, Scott S. Goodwin <[EMAIL PROTECTED]> wrote: > I created a softlink in the top level in my webspace [...] > I was able to then go to: > > http://192.168.0.2/aolserver/gomore Can you hit this URL: http://192.168.0.2/aolserver/gomore/ (with the trailing slash) -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/
Re: [AOLSERVER] Symbolic links and directoryfile
Thanks for the reply. >Maybe you linked to a relative path >incorrectly, or you linked to the absolute path rather than the path >relative to the pageroot. I did link to an absolute path (/home/mailman/blahblah), which is not under pageroot. Is that not allowed? Ellen
Re: [AOLSERVER] Symbolic links and directoryfile
Hi Ellen, every web server has what's called a pageroot, the directory in the filesystem where the web pages are served from. If the web server is going to be able to follow a soft link, that softlink must be a relative softlink rather than a fully-qualified path. Basically, you don't want your web server to be able to access any files outside of it web space (i.e. pageroot). This is ok: ln -s dir/subdir softlink This is ok: ls -s ../dir/subdir softlink This is NOT ok: ln -s /home/scott/dir/subdir softlink In the last case, the web server cannot follow the path because it begins outside of its pageroot, UNLESS your pageroot *is* set to /home. Let me know if you're still having problems with this, /s. -Original Message- From: AOLserver Discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Ellen Spertus Sent: Sunday, August 19, 2001 9:44 PM To: [EMAIL PROTECTED] Subject: Re: [AOLSERVER] Symbolic links and directoryfile Thanks for the reply. >Maybe you linked to a relative path >incorrectly, or you linked to the absolute path rather than the path >relative to the pageroot. I did link to an absolute path (/home/mailman/blahblah), which is not under pageroot. Is that not allowed? Ellen
Re: [AOLSERVER] Symbolic links and directoryfile
Is this enforced in AS 3.x? Your note says "the web server cannot follow...", which is only true if it is chrooted or there is some server code checking links (I think). Jim > > Hi Ellen, > > every web server has what's called a pageroot, the directory in the > filesystem where the web pages are served from. If the web server is > going to be able to follow a soft link, that softlink must be a relative > softlink rather than a fully-qualified path. Basically, you don't want > your web server to be able to access any files outside of it web space > (i.e. pageroot). > > This is ok: > > ln -s dir/subdir softlink > > This is ok: > > ls -s ../dir/subdir softlink > > This is NOT ok: > > ln -s /home/scott/dir/subdir softlink > > > In the last case, the web server cannot follow the path because it > begins outside of its pageroot, UNLESS your pageroot *is* set to /home. > > Let me know if you're still having problems with this, > > > /s. > > -Original Message- > From: AOLserver Discussion [mailto:[EMAIL PROTECTED]] On Behalf > Of Ellen Spertus > Sent: Sunday, August 19, 2001 9:44 PM > To: [EMAIL PROTECTED] > Subject: Re: [AOLSERVER] Symbolic links and directoryfile > > > Thanks for the reply. > > >Maybe you linked to a relative path > >incorrectly, or you linked to the absolute path rather than the path > >relative to the pageroot. > > I did link to an absolute path (/home/mailman/blahblah), which is not > under pageroot. Is that not allowed? > > Ellen >
Re: [AOLSERVER] Symbolic links and directoryfile
+-- On Aug 19, Ellen Spertus said: > Do symbolic links interact properly with directoryfile under Aolserver > 3.2? Yes, as far as I know. > Specifically, I use the default values for directoryfile (index.adp, > index.html, index.htm). In general, when I > request "http://javamlm.mills.edu/.../";, I get the index.html file. I have > a symbolic link to a directory called pipermail, which contains a symbolic > link to directory test1, which contains a file called index.html. (This is > part of the standard mailman installation.) When I > request "http://javamlm.mills.edu/pipermail/test1/";, I get a Server Error, Is it possible that you have a filter or registered proc that is handling this request? > although "http://javamlm.mills.edu/pipermail/test1/index.html"; works > perfectly. The directory does not contain any other index.* files, and the > permissions on the directory (drwxrwsr-x) seem correct. I did this on my notebook's 3.2+ad12 installation: mkdir /tmp/pipermail mkdir /tmp/test1 cd /tmp/pipermail ln -s /tmp/test1 echo yo > /tmp/test1/index.html cd /usr/local/web/localhost/www# this is my pageroot ln -s /tmp/pipermail I can load http://localhost/pipermail/test1/ and get "yo" with no error.
Re: [AOLSERVER] Symbolic links and directoryfile
As far as I know, all requested URLs must be referenced via the pageroot. If you create a URL or a filesystem softlink that has an absolute path like /home/scott/myweb/file, and pageroot is set to "/myweb", the server won't follow the link. I've made that mistake before both in Apache and AOLserver. It's the proper behavior. If someone does get that to work, I'd say it's a bug that needs to be fixed. That doesn't mean, however, that AOLserver itself cannot see or use files referenced via the absolute path, just that it cannot server files via HTTP outside of the pageroot. For example, you can point to an SSL cert via nsopenssl in the nsd.tcl file via an absolute filesystem path. If pageroot and the filesystem's root are the same, then it doesnt' matter, but you'd not want to do this. In the case of a chrooted server, the absolute path will still not work if your chroot top level dir is different from your pageroot setting. Hope this muddies the waters. /s. > Is this enforced in AS 3.x? Your note says "the web server cannot follow...", > which is only true if it is chrooted or there is some server code checking > links (I think). > > Jim > > > > > Hi Ellen, > > > > every web server has what's called a pageroot, the directory in the > > filesystem where the web pages are served from. If the web server is > > going to be able to follow a soft link, that softlink must be a relative > > softlink rather than a fully-qualified path. Basically, you don't want > > your web server to be able to access any files outside of it web space > > (i.e. pageroot). > > > > This is ok: > > > > ln -s dir/subdir softlink > > > > This is ok: > > > > ls -s ../dir/subdir softlink > > > > This is NOT ok: > > > > ln -s /home/scott/dir/subdir softlink > > > > > > In the last case, the web server cannot follow the path because it > > begins outside of its pageroot, UNLESS your pageroot *is* set to /home. > > > > Let me know if you're still having problems with this, > > > > > > /s. > > > > -Original Message- > > From: AOLserver Discussion [mailto:[EMAIL PROTECTED]] On Behalf > > Of Ellen Spertus > > Sent: Sunday, August 19, 2001 9:44 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [AOLSERVER] Symbolic links and directoryfile > > > > > > Thanks for the reply. > > > > >Maybe you linked to a relative path > > >incorrectly, or you linked to the absolute path rather than the path > > >relative to the pageroot. > > > > I did link to an absolute path (/home/mailman/blahblah), which is not > > under pageroot. Is that not allowed? > > > > Ellen > > > >