Bug 3765

Summary: java.io.FileNotFoundException: /home/cagney/.frysk/logs/frysk_core_event.log.1 (Permission denied)
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2245    

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.