Opened 7 years ago

Closed 4 years ago

#677 closed defect (fixed)

Error writing out the SAM keys to sam.keys

Reported by: killyourtv Owned by: mkvore
Priority: maintenance Milestone: 0.9.24
Component: apps/SAM Version: 0.9.1
Keywords: Cc:
Parent Tickets: #1574 Sensitive: no

Description

While playing with Python-I2P (apps/sam/python), the following was logged:

08/02/12 19:49:53.052 ERROR [Mv1Handler 1] net.i2p.sam.SAMBridge : Error writing out the SAM keys to sam.keys
     java.io.FileNotFoundException: sam.keys (Permission denied)
     at java.io.FileOutputStream.open(Native Method)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:104)
     at net.i2p.sam.SAMBridge.storeKeys(SAMBridge.java:191)
     at net.i2p.sam.SAMBridge.addKeystream(SAMBridge.java:152)
     at net.i2p.sam.SAMv1Handler.execSessionMessage(SAMv1Handler.java:242)
     at net.i2p.sam.SAMv1Handler.handle(SAMv1Handler.java:163)
     at net.i2p.sam.SAMHandler.run(SAMHandler.java:192)
     at java.lang.Thread.run(Thread.java:722)
     at net.i2p.util.I2PThread.run(I2PThread.java:85)

My $I2P is r/o.

I realize that this is probably a simple fix but I don't know how…

Subtickets

Change History (3)

comment:1 Changed 7 years ago by zzz

Milestone: 0.9.20.9.3
Owner: set to mkvore
Status: newassigned

SAM doesn't appear to ever have been converted to use the standard I2PAppContext directory methods like getAppDir() to put files in the right place.

Not sure if this is just an issue for the python examples or if the core SAM lib needs to be changed. I can't really mess with this myself because I don't know what iMule uses or needs. Assigning to mkvore.

A workaround is for you to specify the full path for the sam.keys file… somehow…

comment:2 Changed 6 years ago by str4d

Milestone: 0.9.3

comment:3 Changed 4 years ago by zzz

Milestone: 0.9.24
Parent Tickets: 1574
Resolution: fixed
Status: assignedclosed

The sam.keys file is specified on the command line as the first argument. As a workraound you may specify the full path there.

Fixed in 386f2ebd9587cfaac9be078cb8e49775afb1575a to be 0.9.23-4 to use the config dir instead of the base dir if it doesn't already exist in the base dir.

Note: See TracTickets for help on using tickets.