geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: Permission denied running as non-root user
Date Tue, 23 Oct 2007 20:14:03 GMT

On Oct 23, 2007, at 2:46 PM, BradNexen wrote:

>
> When starting geronimo as a non-root user - I am getting the  
> following error:
>
> 13:10:43,697 ERROR [[Deployment]] Servlet.service() for servlet  
> Deployment
> threw exception
> java.io.FileNotFoundException: /tmp/gjms.war (Permission denied)
>
> I have followed the steps below to run geronimo as a non-root user:
>
> The following tasks should be performed while logged as root or a  
> user with
> enough access rights.
>
>    1. create a new user (i.e. gmo) and add it to a specific user  
> group. You
> could use the predefined www user group for instance.
>    2. edit the .bashrc for the user you just created and add the  
> PATH and
> JAVA_HOME variables:
>       PATH=$PATH:<java_home>/bin
>       export PATH
>       JAVA_HOME=<java_home>
>       export JAVA_HOME
>    3. change the user group to all the subdirs in <geronimo_home>
>       chown -R root:www <geronimo_home>
>    4. create a deploy directory within the <geronimo_home> directory
> structure.
>    5. change the access permissions to the following directories
>       chmod -R 774 <geronimo_home>/bin
>       chmod -R 774 <geronimo_home>/deploy
>       chmod -R 774 <geronimo_home>/repository
>       chmod -R 774 <geronimo_home>/var
>    6. login as the new user (i.e. gmo)
>    7. cd <geronimo_home>/bin
>    8. ./geronimo.sh run
>
>
> Does anyone know what I am missing?

Does www have write permission to /tmp? It looks like that is your  
problem... Are you using hot deployment, instead of using bin/ 
deploy.sh to deploy apps?

If you don't want to use /tmp. You can configure java to use a  
different temp directory. Create a <geronimo_home>/tmp directory and  
add something like the following in your .bashrc:

export JAVA_OPTS=-Djava.io.tmpdir=<geronimo_home>/tmp/

--kevan



Mime
View raw message