Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

<on-disconnect> problem... bug?

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
stereotype



Joined: 06 Nov 2006
Posts: 36

PostPosted: Thu Jul 17, 2008 3:26 pm    Post subject: <on-disconnect> problem... bug? Reply with quote

I wanted to be emailed in the event of a source dropping.
So I have all my icecast mounts configured with the following line:
<on-disconnect>/mailtrigger</on-disconnect>

Icecast is running with <chroot>1</chroot>, so the mailtrigger script is located on icecast's root.

Since icecast runs as non-root, I was getting the following in the log:
[2008-07-17 15:00:23] EROR source/source_run_script Unable to run command /mailtrigger (Permission denied)

Fixing the permissions now gets me the following:
[2008-07-17 15:03:55] EROR source/source_run_script Unable to run command /mailtrigger (No such file or directory)

Setting the permissions back to what they were gets me the permission denied message again...

Any ideas on what is happening?
Seems like it only sees the file when it is not allowed to run it...

As a desperate attempt, I also tried copying the script over to the web folder, and even to the system's root folder in case it was somehow looking there, but had no success...

Icecast runs as "icy"...

#ls -l:
-rwxr-xr-x 1 icy icy 86 Jul 16 12:23 mailtrigger

Is it a bug, or am I missing something?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Jul 17, 2008 5:14 pm    Post subject: Reply with quote

probably another quirk of chroot that many people underestimate. If the program being run is a script then the path to the interpreter needs to be valid as well. eg if it's #!/bin/sh then that needs to exist in the chroot jail

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
stereotype



Joined: 06 Nov 2006
Posts: 36

PostPosted: Sun Jul 20, 2008 3:13 am    Post subject: Reply with quote

Thanks karl
Maybe a stupid thing to do, but I tried copying bash over to the jail dir and I'm still getting the same message.
Is it actually possible to run a bash script from a chrooted icecast session?

I just noticed a funny thing regarding the logs:

[2008-07-20 02:59:48] EROR source/source_run_script Unable to run command /mailtrigger (No such file or directory)
[root@domU-12-31-39-00-ED-A5 log]# date
Sat Jul 19 22:59:53 EDT 2008
[root@domU-12-31-39-00-ED-A5 log]#

Why are icecast's logs not on system time?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jul 20, 2008 1:40 pm    Post subject: Reply with quote

It should be possible assuming you have the jail setup correctly. Use the chroot command to test your script

chroot /new/root/jail /mailtrigger

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
stereotype



Joined: 06 Nov 2006
Posts: 36

PostPosted: Sun Jul 20, 2008 2:13 pm    Post subject: Reply with quote

thanks again!
about the logs, why are they not on system time?
ices is looging on system time, but not icecast...
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jul 20, 2008 2:43 pm    Post subject: Reply with quote

Hard to say, icecast just uses the standard seconds from epoch and converted to localtime. Assuming no environment variable is set for your icecast to use a different timezone then maybe epoch is wrong. Is the hwclock in localtime or UTC time?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber