karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] Updated: (KARAF-270) karaf-service scripts tries to create "data" directory in wrong location
Date Wed, 17 Nov 2010 00:25:15 GMT

     [ https://issues.apache.org/jira/browse/KARAF-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Guillaume Nodet updated KARAF-270:
----------------------------------

    Fix Version/s: 2.1.2

> karaf-service scripts tries to create "data" directory in wrong location 
> -------------------------------------------------------------------------
>
>                 Key: KARAF-270
>                 URL: https://issues.apache.org/jira/browse/KARAF-270
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>         Environment: Unix
>            Reporter: Joe Luo
>            Assignee: Guillaume Nodet
>             Fix For: 2.1.2, 2.2.0
>
>         Attachments: karaf-service.patch
>
>
> karaf-service scripts tries to create "data" directory in wrong location. Here is start()
function:
> {code}
> start() {
>     echo "Starting $APP_LONG_NAME..."
>     getpid
>     if [ "X$pid" = "X" ]
>     then
>         if [ ! -d ../../data ]; then
>             mkdir ../../data
>         fi
>         if [ ! -d ../../data/log ]; then
>             mkdir ../../data/log
>         fi
>         COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME
wrapper.pid
> file=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
>         exec $COMMAND_LINE
>     else
>         echo "$APP_LONG_NAME is already running."
>         exit 1
>     fi
> }
> {code}
> Basically, it tries to create "data" directory two levels up from "<apache-servicemix-4.2.0
install dir>/bin" directory.
> If we install servicemix into /opt directory, say we have directory structure like:
> /opt/apache-servicemix-4.2.0
> "/opt" is owned by root user. So the karaf-scripts tries to create "data" directory directly
under "/opt" which is outside of "/opt/apache-servicemix-4.2.0". It will be fine if the service
is started by root user. However, it will fail with error below if the service is started
by any other users:
> {quote}
>     Starting karaf...
>     mkdir: cannot create directory `../../data': Permission denied
>     mkdir: cannot create directory `../../data/log': No such file or directory
> {quote}
> To fix this problem, we need to change "../../data" from karaf-service scripts start()
function to "../data".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message