Bug 3765 - java.io.FileNotFoundException: /home/cagney/.frysk/logs/frysk_core_event.log.1 (Permission denied)
Summary: java.io.FileNotFoundException: /home/cagney/.frysk/logs/frysk_core_event.log....
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 2245
  Show dependency treegraph
 
Reported: 2006-12-19 20:49 UTC by Andrew Cagney
Modified: 2006-12-20 15:55 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-12-19 20:49:45 UTC
[cagney@frysk32 ~]$ HOME=/tmp ftrace ls
Error upon logging: OPEN_FAILURE
java.io.FileNotFoundException: /home/cagney/.frysk/logs/frysk_core_event.log.1
(Permission denied)
   at gnu.java.nio.channels.FileChannelImpl.open(libgcj.so.7rh)
   at gnu.java.nio.channels.FileChannelImpl.<init>(libgcj.so.7rh)
   at gnu.java.nio.channels.FileChannelImpl.create(libgcj.so.7rh)
   at java.io.FileOutputStream.<init>(libgcj.so.7rh)
   at java.util.logging.FileHandler.createFileStream(libgcj.so.7rh)
   at java.util.logging.FileHandler.<init>(libgcj.so.7rh)
   at java.util.logging.FileHandler.<init>(libgcj.so.7rh)
   at frysk.EventLogger.get(ftrace)
   at frysk.event.EventLoop.<init>(ftrace)
   at frysk.proc.Manager.<clinit>(ftrace)
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   at frysk.util.Ftrace.init(ftrace)
   at frysk.util.Ftrace.trace(ftrace)
   at ftrace.run(ftrace)
   at ftrace.main(ftrace)
Comment 1 Mark Wielaard 2006-12-20 15:55:05 UTC
This caused because of the definition of FRYSK_DIR in Config:

    public static final String FRYSK_DIR
        = System.getProperty("user.home") + "/" + ".frysk" + "/";

"user.home" is set to getpwuid()->pw_dir (in gcj), so it doesn't take $HOME into
account. You can use System.getenv("HOME") however to get at $HOME from java.