ofbiz.rc running ofbiz on linux as a service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ofbiz.rc running ofbiz on linux as a service

masionas
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?
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz.rc running ofbiz on linux as a service

hans_bakker
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.

Reply | Threaded
Open this post in threaded view
|

Re: ofbiz.rc running ofbiz on linux as a service

Pierre Smits
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.
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz.rc running ofbiz on linux as a service

Pierre Smits
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.
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz.rc running ofbiz on linux as a service

masionas
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.
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz.rc running ofbiz on linux as a service

masionas
In reply to this post by Pierre Smits
Hi Pierre,

I am on Fedora Linux 15.