[tahoe-dev] error message mystery

David-Sarah Hopwood david-sarah at jacaranda.org
Sat Oct 23 16:36:35 UTC 2010


Kyle Markley wrote:
> 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.

Right, that error is explicable if somewhat unfriendly.
(http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1048 is about printing fewer
tracebacks for errors that could be anticipated.)

> The second example below is bizarre, giving a permission denied error.
[...]

> $ 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/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

Presumably the os.getcwdu() is failing with an EPERM error from a C library
call. Do you get a similar exception from

  python -c "import os; print os.getcwdu()"

and from

  python -c "import os; print os.getcwd()"

in the same current directory?

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20101023/259dbfa6/attachment.asc>


More information about the tahoe-dev mailing list