Hi Guys,
I am having some issues on getting working ofbiz as a service. Followed the setup guide and it did not work. The problem is that a call to /etc/init.d/ofbiz returns "access denied" error when is called by root user. Here is the original code from "ofbiz.rc" script: # If root is running this script, su to $OFBIZ_USER first if [ "$UID" = "0" ]; then exec su - $OFBIZ_USER -c "$0 $1" fi ANd what I have changed was change "$0" to an absolute path of "/etc/init.d/ofbiz" because otherwise it gave a "no such file error". So now it looks like: # If root is running this script, su to $OFBIZ_USER first if [ "$UID" = "0" ]; then exec su - $OFBIZ_USER -c "/etc/init.d/ofbiz $1" fi it founds the service file but gives permission error. Anyone faced this problem? |
make the file executable? Has the user 'ofbiz' permission to run it?
Regards, Hans Bakker Antwebsystems.com On 08/01/14 01:07, masionas wrote: > Hi Guys, > > I am having some issues on getting working ofbiz as a service. Followed the > setup guide and it did not work. The problem is that a call to > /etc/init.d/ofbiz returns "access denied" error when is called by root > user. > > Here is the original code from "ofbiz.rc" script: > > # If root is running this script, su to $OFBIZ_USER first > if [ "$UID" = "0" ]; then > exec su - $OFBIZ_USER -c "$0 $1" > fi > > ANd what I have changed was change "$0" to an absolute path of > "/etc/init.d/ofbiz" because otherwise it gave a "no such file error". So now > it looks like: > > # If root is running this script, su to $OFBIZ_USER first > if [ "$UID" = "0" ]; then > exec su - $OFBIZ_USER -c "/etc/init.d/ofbiz $1" > fi > > it founds the service file but gives permission error. > > Anyone faced this problem? > > > > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/ofbiz-rc-running-ofbiz-on-linux-as-a-service-tp4646924.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
In reply to this post by masionas
Verstuurd vanaf mijn iPad > Op 7 jan. 2014 om 19:07 heeft masionas <[hidden email]> het volgende geschreven: > > Hi Guys, > > I am having some issues on getting working ofbiz as a service. Followed the > setup guide and it did not work. The problem is that a call to > /etc/init.d/ofbiz returns "access denied" error when is called by root > user. > > Here is the original code from "ofbiz.rc" script: > > # If root is running this script, su to $OFBIZ_USER first > if [ "$UID" = "0" ]; then > exec su - $OFBIZ_USER -c "$0 $1" > fi > > ANd what I have changed was change "$0" to an absolute path of > "/etc/init.d/ofbiz" because otherwise it gave a "no such file error". So now > it looks like: > > # If root is running this script, su to $OFBIZ_USER first > if [ "$UID" = "0" ]; then > exec su - $OFBIZ_USER -c "/etc/init.d/ofbiz $1" > fi > > it founds the service file but gives permission error. > > Anyone faced this problem? > > > > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/ofbiz-rc-running-ofbiz-on-linux-as-a-service-tp4646924.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
In reply to this post by masionas
What kind of kind of system are you trying to achieve this? Ubuntu? RedHat? Other?
Verstuurd vanaf mijn iPad > Op 7 jan. 2014 om 19:07 heeft masionas <[hidden email]> het volgende geschreven: > > Hi Guys, > > I am having some issues on getting working ofbiz as a service. Followed the > setup guide and it did not work. The problem is that a call to > /etc/init.d/ofbiz returns "access denied" error when is called by root > user. > > Here is the original code from "ofbiz.rc" script: > > # If root is running this script, su to $OFBIZ_USER first > if [ "$UID" = "0" ]; then > exec su - $OFBIZ_USER -c "$0 $1" > fi > > ANd what I have changed was change "$0" to an absolute path of > "/etc/init.d/ofbiz" because otherwise it gave a "no such file error". So now > it looks like: > > # If root is running this script, su to $OFBIZ_USER first > if [ "$UID" = "0" ]; then > exec su - $OFBIZ_USER -c "/etc/init.d/ofbiz $1" > fi > > it founds the service file but gives permission error. > > Anyone faced this problem? > > > > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/ofbiz-rc-running-ofbiz-on-linux-as-a-service-tp4646924.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
In reply to this post by hans_bakker
Hi Hans,
The file has -rwxr-xr-x permissions, basically like others services under /etc/init.d/ and ownership of "root:root". I changed ownership to "ofbiz:ofbiz" it did not help - same thing. |
Free forum by Nabble | Edit this page |