Results 1 to 2 of 2
Hi everyone,
I am having some problems getting a service to start properly on my Trixbox (CentOS 4.5 i think).
The service is Asterfax and runs using java. I can ...
- 08-17-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 2
Service start problem : Permission denied
Hi everyone,
I am having some problems getting a service to start properly on my Trixbox (CentOS 4.5 i think).
The service is Asterfax and runs using java. I can start asterfax fine by using either the console file or the non console file. I am normally loged in as root when doing this (yes this is probably bad).
This runs the software fine.Code:cd /usr/lib/asterfax/ ./nohupasterfax.sh
However, during installation it create a service startup in the init.d folder. This can be run from the terminal by the following...
This then outputs "./nohupasterfax.sh: line 26: iaxmodem: command not found" to the terminal, which is ok because it always displays this even when running it manually. After running it nothing appears in the "ps fax" list, but in the asterfax log path (/var/log/asterfax) a file exists which gets updated everytime i try to start the service. The file "error.out" contains the following error...Code:service asterfax start
nohup: cannot run command `java': Permission denied
How do i fix this? I am a newbie when it comes to linux, but i have managed to get the trixbox/asterisk running fine.
Oh, the contents of the asterfax file in "/etc/rc.d/init.d/" is...
Please help, many thanks!Code:#!/bin/sh case "$1" in start) cd /usr/lib/asterfax ./nohupasterfax.sh ;; stop) cd /usr/lib/asterfax ./killasterfax.sh ;; restart) cd /usr/lib/asterfax ./killasterfax.sh nohupasterfax.sh ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $RETVAL
- 08-17-2007 #2Just Joined!
- Join Date
- Aug 2007
- Posts
- 2
Turns out that the java path is not set for whatever user is used when service is run. I modified the contents of the asterfax file in "/etc/rc.d/init.d/" and added a few "export" commands. That got it working. Dirty hack!


Reply With Quote