[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #5678 [arm]: Arm crashes if it lacks write permissons for home directory



#5678: Arm crashes if it lacks write permissons for home directory
--------------------+-------------------------------------------------------
 Reporter:  atagar  |          Owner:  atagar
     Type:  defect  |         Status:  new   
 Priority:  minor   |      Milestone:        
Component:  arm     |        Version:        
 Keywords:          |         Parent:        
   Points:          |   Actualpoints:        
--------------------+-------------------------------------------------------
 Arm defaults to putting its data directory in '~/.arm'. However, in at
 least one reported case they lacked write permissions there resulting
 in...

 {{{
 Traceback (most recent call last):
   File "/usr/share/arm/starter.py", line 543, in <module>
     cli.controller.startTorMonitor(time.time() - initTime)
   File "/usr/share/arm/cli/controller.py", line 683, in startTorMonitor
     curses.wrapper(drawTorMonitor, startTime)
   File "/usr/lib/python2.6/curses/wrapper.py", line 44, in wrapper
     return func(stdscr, *args, **kwds)
   File "/usr/share/arm/cli/controller.py", line 778, in drawTorMonitor
     cli.wizard.showWizard()
   File "/usr/share/arm/cli/wizard.py", line 313, in showWizard
     relaySelection = RelayType.RESUME if manager.isTorrcAvailable() else
 RelayType.RELAY
   File "/usr/share/arm/cli/controller.py", line 482, in isTorrcAvailable
     torrcLoc = self.getTorrcPath()
   File "/usr/share/arm/cli/controller.py", line 474, in getTorrcPath
     return self._controller.getDataDirectory() + "torrc"
   File "/usr/share/arm/cli/controller.py", line 401, in getDataDirectory
     if not os.path.exists(dataDir): os.makedirs(dataDir)
   File "/usr/lib/python2.6/os.py", line 157, in makedirs
     mkdir(name, mode)
 OSError: [Errno 13] Permission denied: '/home/ubuntu/.arm/'
 }}}

 We should make arm fall back to not having a data directory at all. This
 means making the getDataDirectory() callers accept a None response...

 {{{
 atagar@morrigan:~/Desktop/arm$ grep -R "getDataDirectory(" ./*
 ./release_rpm/src/cli/wizard.py:          dataDir =
 cli.controller.getController().getDataDirectory()
 ./release_rpm/src/cli/wizard.py:  dataDir =
 cli.controller.getController().getDataDirectory()
 ./release_rpm/src/cli/controller.py:  def getDataDirectory(self):
 ./release_rpm/src/cli/controller.py:    return
 self._controller.getDataDirectory() + "torrc"
 ./src/cli/wizard.py:          dataDir =
 cli.controller.getController().getDataDirectory()
 ./src/cli/wizard.py:  dataDir =
 cli.controller.getController().getDataDirectory()
 ./src/cli/controller.py:  def getDataDirectory(self):
 ./src/cli/controller.py:    return self._controller.getDataDirectory() +
 "torrc"
 }}}

 Bug reported by MoPac.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5678>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs