[tahoe-dev] error message mystery

David-Sarah Hopwood david-sarah at jacaranda.org
Sat Oct 23 23:07:31 UTC 2010


Kyle Markley wrote:
>>>   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?
> 
> Those variations are all fine:
> 
> $ cd /tmp
> $ python -c "import os; print os.getcwdu()"
> /tmp
> $ cd /share
> $ python -c "import os; print os.getcwdu()"
> /share
> $ cd /tmp
> $ python -c "import os; print os.getcwd()" 
> /tmp
> $ cd /share
> $ python -c "import os; print os.getcwd()"
> /share

That's odd. os.path.join does no system calls, so if os.getcwdu isn't causing
the exception then I'm flummoxed.

Tahoe-LAFS has no calls to chdir except in startstop_node.py, so "tahoe ls"
should never change the process' current directory. However, to confirm that,
please try inserting "print os.getcwd();" at line 302 of
/usr/local/lib/python2.6/site-packages/allmydata/util/fileutil.py


In case anyone can see something I've missed:

Code for os.getcwdu on Py2.6.x branch (search for "posix_getcwdu") is at
http://svn.python.org/view/python/branches/release26-maint/Modules/posixmodule.c?view=markup

Code for POSIX os.path.join on Py2.6.x branch (search for "def join") is at
http://svn.python.org/view/python/branches/release26-maint/Lib/posixpath.py?view=markup

-- 
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/20101024/675465bd/attachment.asc>


More information about the tahoe-dev mailing list