The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do we run Java with /tmp noexec ?

Discussion in 'General Discussion' started by mydomain, Jul 10, 2007.

  1. mydomain

    mydomain Well-Known Member

    Joined:
    Aug 10, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    Hi wonder if someone would be kind enough to advise how our clients can run java from shell or crontab when we have /tmp and /var/tmp etc set with noexec for security reasons.

    Currently when trying to run it gives:

    /usr/bin/java: line 67: /var/tmp/javagM2660: Permission denied
    /usr/bin/java: line 67: /var/tmp/javagM2660: Success

    and does not run due to the permissions issue.

    Any help is greatly appreciate, TIA.

    Mike
     
  2. wefrank

    wefrank Member

    Joined:
    Oct 2, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Massachusetts
    Java Environment

    In the java programming environment, it is likely that the system environment variable java.io.tmpdir is set to
    /var/tmp/ <SomeSessionvariable>

    (or some other environment variable)

    since there is a "line number" (line 67) listed, perhaps the java command is actually a shell script.

    a) Verify if /usr/bin/java is a shell script, and post the entry around those lines

    or

    b) See if your java environment variable java.io.tmpdir can be configured to use something like
    $HOME/tmp (where each user has a tmp subdirectory and execute access is allowed)
     
  3. mydomain

    mydomain Well-Known Member

    Joined:
    Aug 10, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    The java shell script /usr/bin/java around line 67 shows:

    export CLASSPATH="$clp"
    COMMAND=`mktemp /tmp/javaXXXXXX`
    echo "rm $COMMAND" >$COMMAND
    echo "exec /usr/bin/gij $params" >>$COMMAND
    chmod +x $COMMAND
    exec $COMMAND

    How can this be changed exactly so each user can run java and it uses their own $HOME/temp directory?


    Thanks in advance.
     
    #3 mydomain, Jul 11, 2007
    Last edited: Jul 11, 2007
  4. PeterTable

    PeterTable Member

    Joined:
    Feb 27, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem, can anyone help?
    Why do the Java doesnt work?
    It is configured as stock, I hadnt changed anything and it doesnt works.
     
  5. PeterTable

    PeterTable Member

    Joined:
    Feb 27, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page