Can't run Jose in unprivileged mode

Help
alexis
2003-11-12
2003-11-14
  • alexis
    alexis
    2003-11-12

    Hi all!
    first congratulations to the developer for the awesome job done ! this is the best free Chess game I've ever seen !
    It seems there is an issue with jose's file attributes.
    I installed it in root mode under /usr/games; the installer did the remaining stuff (eg, jose folder was not previously created). As a root user, I can play with no problems. However, when runing the game in unpriviledged mode:
    java.io.FileNotFoundException: out.txt (Permission denied)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at com.zerog.lax.LAX.setStdOutStdErr(DashoA8113)
            at com.zerog.lax.LAX.setStdOutStdErrOnSupportedPlatforms(DashoA8113)
            at com.zerog.lax.LAX.<init>(DashoA8113)
            at com.zerog.lax.LAX.main(DashoA8113)
    java.io.FileNotFoundException: err.txt (Permission denied)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at com.zerog.lax.LAX.setStdOutStdErr(DashoA8113)
            at com.zerog.lax.LAX.setStdOutStdErrOnSupportedPlatforms(DashoA8113)
            at com.zerog.lax.LAX.<init>(DashoA8113)
            at com.zerog.lax.LAX.main(DashoA8113)
    I modified jose 's file group owner ship (changed to non-root); however various errors still remain.
    Do you have any hints on how to solve this problem ?
    below is the content of
    error.log (normal root:root owner ship was restored)
    ---- Version Info ----
    jose: 1.1
    OS:   Linux 2.4.21-0.13mdk
    Arch:  i386
    Java: 1.4.2_02-b03
    ----------------------
    ---- Wed Nov 12 00:11:02 CET 2003 ----
    java.io.IOException: java.io.IOException: /usr/games/jose/engines/crafty/Linux_i386/crafty-19.03: cannot execute
            at java.lang.UNIXProcess.<init>(Unknown Source)
            at java.lang.Runtime.execInternal(Native Method)
            at java.lang.Runtime.exec(Unknown Source)
            at de.jose.plugin.XBoardPlugin.init(XBoardPlugin.java:112)
            at de.jose.Application.openPlugin(Application.java:2270)
            at de.jose.Application.access$000(Application.java:67)
            at de.jose.Application$27.Do(Application.java:1033)
            at de.jose.CommandDispatcher.DoIt(CommandDispatcher.java:221)
            at de.jose.CommandDispatcher.forward(CommandDispatcher.java:86)
            at de.jose.CommandDispatcher.handle(CommandDispatcher.java:61)
            at de.jose.view.BoardPanel.userMove(BoardPanel.java:453)
            at de.jose.view.BoardView2D.mouseEnd(BoardView2D.java:746)
            at de.jose.view.BoardView2D.mouseEnd(BoardView2D.java:706)
            at de.jose.view.BoardView2D.mouseReleased(BoardView2D.java:682)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
    stderr.log
    [Enable keys..]

    stdout.log and err.txt were empty

     
    • Peter Schäfer
      Peter Schäfer
      2003-11-13

      please try this:

      chmod +x /usr/games/jose/bin/Linux_i386/mysqld
      chmod o+rw /usr/games/jose/database/mysql/jose/*

      chmod +x /usr/games/jose/engines/crafty/Linux_i386/crafty-19.03
      chmod o+w /usr/games/jose/engines/crafty/game.001

      to create the database in another directory (default is /usr/games/jose/database) use:

      java -jar jose.jar jose.datadir=/home/foo/jose-database

       
    • alexis
      alexis
      2003-11-14

      Hi !
      As far as I could see, it worked ( could play a bit, chess engine is OK. However, I noted some error at start up, don't know if they are armless.
      java.io.FileNotFoundException: out.txt (Permission denied)
              at java.io.FileOutputStream.open(Native Method)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
              at com.zerog.lax.LAX.setStdOutStdErr(DashoA8113)
              at com.zerog.lax.LAX.setStdOutStdErrOnSupportedPlatforms(DashoA8113)
              at com.zerog.lax.LAX.<init>(DashoA8113)
              at com.zerog.lax.LAX.main(DashoA8113)
      java.io.FileNotFoundException: err.txt (Permission denied)
              at java.io.FileOutputStream.open(Native Method)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
              at com.zerog.lax.LAX.setStdOutStdErr(DashoA8113)
              at com.zerog.lax.LAX.setStdOutStdErrOnSupportedPlatforms(DashoA8113)
              at com.zerog.lax.LAX.<init>(DashoA8113)
              at com.zerog.lax.LAX.main(DashoA8113)

      Thanks for your help,
      regards
      Alexis