Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #5678

Closed
Open
Opened Apr 26, 2012 by Damian Johnson@atagar

Arm crashes if it lacks write permissons for home directory

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.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#5678