[tahoe-dev] error message mystery

Kyle Markley kyle at arbyte.us
Sat Oct 23 06:10:31 UTC 2010


Here's a mystery...

Here's the cap for an empty directory on the pubgrid:
URI:DIR2:chiy4eu7a2ydesdh6mcxlnoy24:av27llhq4ytjmlwhw2h4i4jr3kk5ki6oyttxxee7rvzfvrs3jf2a

And here's the output from two commands that both fail because the node
directory passed with -d doesn't exist.  The interesting thing here is that
they fail with different error messages depending on what my current
directory is.  That first example below makes sense to me because it tells
me a file does not exist.  The second example below is bizarre, giving a
permission denied error.


$ ls -ld /tmp
drwxrwxrwt  6 root  wheel  512 Oct 22 22:16 /tmp/
$ cd /tmp
$ tahoe ls -d notexist
URI:DIR2:chiy4eu7a2ydesdh6mcxlnoy24:av27llhq4ytjmlwhw2h4i4jr3kk5ki6oyttxxee7rvzfvrs3jf2a
Traceback (most recent call last):
  File "/usr/local/bin/tahoe", line 9, in <module>
    load_entry_point('allmydata-tahoe==1.8.0', 'console_scripts',
'tahoe')()
  File
"/usr/local/lib/python2.6/site-packages/allmydata/scripts/runner.py", line
118, in run
    rc = runner(sys.argv[1:], install_node_control=install_node_control)
  File
"/usr/local/lib/python2.6/site-packages/allmydata/scripts/runner.py", line
69, in runner
    config.parseOptions(argv)
  File
"/usr/local/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-openbsd-4.6-amd64.egg/twisted/python/usage.py",
line 231, in parseOptions
    self.subOptions.parseOptions(rest)
  File
"/usr/local/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-openbsd-4.6-amd64.egg/twisted/python/usage.py",
line 241, in parseOptions
    self.postOptions()
  File "/usr/local/lib/python2.6/site-packages/allmydata/scripts/cli.py",
line 42, in postOptions
    self['node-url'] = open(node_url_file, "r").read().strip()
IOError: [Errno 2] No such file or directory: u'/tmp/notexist/node.url'



$ ls -ld /share
drwxrwxrwt  15 root  wheel  1024 Oct 22 20:22 /share/
$ cd /share
$ tahoe ls -d notexist
URI:DIR2:chiy4eu7a2ydesdh6mcxlnoy24:av27llhq4ytjmlwhw2h4i4jr3kk5ki6oyttxxee7rvzfvrs3jf2a
Traceback (most recent call last):
  File "/usr/local/bin/tahoe", line 9, in <module>
    load_entry_point('allmydata-tahoe==1.8.0', 'console_scripts',
'tahoe')()
  File
"/usr/local/lib/python2.6/site-packages/allmydata/scripts/runner.py", line
118, in run
    rc = runner(sys.argv[1:], install_node_control=install_node_control)
  File
"/usr/local/lib/python2.6/site-packages/allmydata/scripts/runner.py", line
69, in runner
    config.parseOptions(argv)
  File
"/usr/local/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-openbsd-4.6-amd64.egg/twisted/python/usage.py",
line 231, in parseOptions
    self.subOptions.parseOptions(rest)
  File
"/usr/local/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-openbsd-4.6-amd64.egg/twisted/python/usage.py",
line 241, in parseOptions
    self.postOptions()
  File "/usr/local/lib/python2.6/site-packages/allmydata/scripts/cli.py",
line 28, in postOptions
    self['node-directory'] = argv_to_abspath(self['node-directory'])
  File
"/usr/local/lib/python2.6/site-packages/allmydata/util/encodingutil.py",
line 105, in argv_to_abspath
    return abspath_expanduser_unicode(argv_to_unicode(s))
  File
"/usr/local/lib/python2.6/site-packages/allmydata/util/fileutil.py", line
302, in abspath_expanduser_unicode
    path = os.path.join(os.getcwdu(), path)
OSError: [Errno 13] Permission denied



Ignoring the fact that my /share violates hier(7), could someone explain
what's going on here?  The two directories have exactly the same
permissions and neither contains something named 'notexist'.  So why is the
reported error different?

-- 
Kyle Markley


More information about the tahoe-dev mailing list