Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. wefrank

    wefrank Member

    Joined:
    Oct 2, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    151
    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)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mydomain

    mydomain Well-Known Member

    Joined:
    Aug 10, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    166
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #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:
    151
    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:
    151
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice