Koozali.org: home of the SME Server

how do u link a html directory to a folder?

John

how do u link a html directory to a folder?
« on: September 25, 2003, 08:14:49 AM »
I installed an i-bay for music..I want to link an actual folder to the html directory instead of adding the mp3 into that directory

RayG

Re: how do u link a html directory to a folder?
« Reply #1 on: September 25, 2003, 08:51:39 AM »
Which package are you using for the music iBay ?

Ray Mitchell

Re: how do u link a html directory to a folder?
« Reply #2 on: September 25, 2003, 11:46:29 AM »
try
man ln
to learn how to create a link
Regs
Ray

John

Re: how do u link a html directory to a folder?
« Reply #3 on: September 25, 2003, 11:01:28 PM »
I tried that with no luck here is what i used
# ln -s /home/e-smith/files/ibays/music/html /dev/hdb1/mp3
The doc with the mp3 jukebox says to add the mp3's to the html folder/directory
Well i don't want to do that even if i wanted i couldn't cause the hard drive where sme is installed isn't large enough

Klaus Eckert

Re: how do u link a html directory to a folder?
« Reply #4 on: September 26, 2003, 02:48:33 AM »
try it without "/dev/hdb1" and it should work.
you cannot access a device like hdb1.

cheers klaus

John

Re: how do u link a html directory to a folder?
« Reply #5 on: September 26, 2003, 04:20:41 AM »
tried
# ln -s /home/e-smith/files/ibays/music/html /mp3
still no go

The files for the ibay and the program r loaded onto drive hda  my mp3's r on hdb1 in a folder called mp3

Klaus Eckert

Re: how do u link a html directory to a folder?
« Reply #6 on: September 26, 2003, 04:58:44 AM »
"man ln" says "ln [OPTION]... TARGET [LINK_NAME]"

so let's check a few things:
- you want to link /mp3 to /..../html, correct?
- does the folder /mp3 exist? if yes, the OK; if no, then create it
- does a folder /...../html exist? if yes, delete it; if no, OK
- ln -s /mp3 /....../html
- cd /...../music
- ls -al
- now you should see "html -> /mp3"
- maybe you have to set the permissions for /mp3 and for /....../html, so that your "music-box" can access them.

that's it.

cheers klaus

John

Re: how do u link a html directory to a folder?
« Reply #7 on: September 26, 2003, 05:33:52 AM »
yes the folder mp3 exsists on another hard drive in the sme box.
I deleted the /......./html folder then ran the command u typed and this is what i got

[root@SPIDERMAN music]# ln -s /mp3 /home/e-smith/files/ibays/music/html
[root@SPIDERMAN music]# ls -al
total 16
drwxr-xr-x    4 root     root         4096 Sep 25 16:24 .
drwxr-xr-x    3 root     root         4096 Sep 24 18:10 ..
drwxrwsr-x    2 root     shared       4096 Apr 22 12:22 cgi-bin
drwxrwsr-x    2 root     shared       4096 Apr 22 12:22 files
lrwxrwxrwx    1 root     root            4 Sep 25 16:24 html -> /mp3
[root@SPIDERMAN music]#

now when i try to access http://spiderman/music   i get your not authorized to view this page...I double checked the settings for the ibay module and everything is set correctly

Dan Brown

Re: how do u link a html directory to a folder?
« Reply #8 on: September 26, 2003, 05:50:09 AM »
A pizza says you don't have FollowSymLinks turned on in httpd.conf for this directory.

John

Re: how do u link a html directory to a folder?
« Reply #9 on: September 26, 2003, 06:19:18 AM »
???????

Dan Brown

Re: how do u link a html directory to a folder?
« Reply #10 on: September 26, 2003, 06:51:04 AM »
Apache has an option called FollowSymLinks, which (as it tends to suggest) allows it to follow symbolic links.  By default in an SME installation, it's turned off.  You'll need to turn it on for the ibay you want to use.

John

Re: how do u link a html directory to a folder?
« Reply #11 on: September 26, 2003, 07:18:59 AM »
can u tell me how to turn it on?
Thanks

Craig

Re: how do u link a html directory to a folder?
« Reply #12 on: September 26, 2003, 02:58:42 PM »
Why not mount the drive in the html ibay?  That way you can keep things simple.  No links or problems with permissions.

Once you've setup the mounting in fstab, change the user on all files to the user of the ibay.  The on each boot you'll have it in the correct place and with no permission errors, you wont have the security problem in apache of folloing symlinks.

I mount my /home/e-smith/files on another disk.  This way I have a much bigger disk  for my data (like you) and a small disk for my system.

John

Re: how do u link a html directory to a folder?
« Reply #13 on: September 26, 2003, 05:59:56 PM »
But that drive is already mounted in /......../john/home

Can a folder on a already mounted drive be mounted else where?