Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: arnoldob on March 12, 2007, 07:11:43 PM

Title: Need to access something in /opt with a web-app in an Ibay
Post by: arnoldob on March 12, 2007, 07:11:43 PM
Hello,
I use netjuke to play music on my LAN. I have the music in /opt/music. Netjuke wants it in /home/e-smith/files/ibays/netjuke/html/var/music so i copied the stuff that netjuke had in it's music directory to /opt/music, deleted the existing directory created a symlink:
Code: [Select]
ln -s /opt/music /home/e-smith/files/ibays/netjuke/html/var/music

Went to the music folder from:
Code: [Select]
/home/e-smith/files/ibays/netjuke/html/var/music

and ran:
Code: [Select]
chown -R www:www *
chmod -R 775 *


Added the new dir so PHP won't complain:
Code: [Select]
db accounts setprop netjuke PHPBaseDir /home/e-smith/files/ibays/netjuke/:/tmp:/opt/music
signal-event ibay-modify netjuke
expand-template /etc/httpd/conf/httpd.conf
/etc/rc7.d/S86httpd-e-smith sigusr1


So far I can browse the music dir from WinXP boxes on the LAN and play stuff directly from there, but when I launch a link from netjuke I always get a general error from realplayer indicating the file cannot be found. I'd prefer that netjuke handle moving files around etc. I had one of the kids accidentally move files around and delete them in the past when they had direct access to the music files in an ibay.

There are no helpful errors in the messages log, I guess SME 7.1.2 doesn't log php errors there anymore? I see this in the httpd.log:

Code: [Select]
[Mon Mar 12 12:38:12 2007] [error] [client 192.168.1.202] Symbolic link not allowed: /home/e-smith/files/ibays/netjuke/html/var/music
[Mon Mar 12 12:39:49 2007] [error] [client 192.168.1.202] Symbolic link not allowed: /home/e-smith/files/ibays/netjuke/html/var/music
[Mon Mar 12 13:20:23 2007] [error] [client 192.168.1.202] Symbolic link not allowed: /home/e-smith/files/ibays/netjuke/html/var/music
[Mon Mar 12 13:50:41 2007] [error] [client 192.168.1.202] Symbolic link not allowed: /home/e-smith/files/ibays/netjuke/html/var/music
[Mon Mar 12 13:53:15 2007] [error] [client 192.168.1.202] Symbolic link not allowed: /home/e-smith/files/ibays/netjuke/html/var/music
[Mon Mar 12 13:53:39 2007] [error] [client 192.168.1.202] Symbolic link not allowed: /home/e-smith/files/ibays/netjuke/html/var/music


I think I missed something that would let a php app in an ibay run/modify files stored in /opt/music. Any clues?
Title: Re: Need to access something in /opt with a web-app in an Ib
Post by: cactus on March 12, 2007, 10:12:35 PM
Quote from: "arnoldob"
Code: [Select]
[Mon Mar 12 13:53:39 2007] [error] [client 192.168.1.202] Symbolic link not allowed: /home/e-smith/files/ibays/netjuke/html/var/music

I think I missed something that would let a php app in an ibay run/modify files stored in /opt/music. Any clues?
Did you set:
Code: [Select]
Options +FollowSymLinksin the apache/httpd configuration file for your ibay?

If i were you I'd prefer you not to create an ibay but create a new template instead to configure everything properly so you can use var/www or /opt for all neccesarry code.
Title: Need to access something in /opt with a web-app in an Ibay
Post by: arnoldob on March 13, 2007, 03:05:47 AM
Didn't use a tewmplate:
[root@spanky ~]# db accounts show netjuke
netjuke=ibay
    CgiBin=enabled
    FollowSymLinks=enabled
    Gid=5012
    Group=adults
    Name=shared music
    PHPBaseDir=/home/e-smith/files/ibays/netjuke/:/tmp:/opt/music
    PasswordSet=yes
    PublicAccess=global-pw-remote
    Uid=5012
    UserAccess=wr-group-rd-everyone