| View previous topic :: View next topic |
| Author |
Message |
stereotype
Joined: 06 Nov 2006 Posts: 36
|
Posted: Thu Jul 17, 2008 3:26 pm Post subject: <on-disconnect> problem... bug? |
|
|
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 |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jul 17, 2008 5:14 pm Post subject: |
|
|
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 |
|
 |
stereotype
Joined: 06 Nov 2006 Posts: 36
|
Posted: Sun Jul 20, 2008 3:13 am Post subject: |
|
|
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 |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Jul 20, 2008 1:40 pm Post subject: |
|
|
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 |
|
 |
stereotype
Joined: 06 Nov 2006 Posts: 36
|
Posted: Sun Jul 20, 2008 2:13 pm Post subject: |
|
|
thanks again!
about the logs, why are they not on system time?
ices is looging on system time, but not icecast... |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Jul 20, 2008 2:43 pm Post subject: |
|
|
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 |
|
 |
|