bzr 1.0.0.candidate.3: ERROR: Permission denied: [Errno 13]

Jari Aalto jari.aalto at cante.net
Thu Dec 13 14:43:58 GMT 2007


* Thu 2007-12-13 John Arbash Meinel <john at arbash-meinel.com>
* Message-Id: 476141D5.6070503 at arbash-meinel.com
>>>>     Committing to: /usr/src/build/build/ttcp/ttcp-20071212/CYGWIN-PATCHES/
>>>>     bzr: ERROR: Permission denied: "df/0001makefilenewfile.-20071213000827-9zm28j15sb7x8kdi-1.knit": [Errno 13] Permission denied: '/usr/src/build/build/ttcp/ttcp-20071212/CYGWIN-PATCHES/.bzr/repository/knits/df/0001makefilenewfile.-20071213000827-9zm28j15sb7x8kdi-1.knit'
>>> Can you run it again with -Derror flag, please? Or show relevant part
>>> of .bzr.log. Probably it's related to
>>> https://bugs.launchpad.net/bzr/+bug/139253
>>>
>>> I really like to know how to reproduce this error.
>> 
>> I tested with the latest as well. This is native Cygwin on FAT32
>> partition. Here is trace. Let me know how can I help more.
>> 
>> Commands: "bzr init; bzd add" work, but not "ci" or "co".
>> 
>> $ bzr --version
>> Bazaar (bzr) 1.0.0.candidate.3
>>   from bzr checkout /usr/lib/python2.5/site-packages/bzrlib
>>     revision: 2
>>     revid: jari.aalto at cante.net-20070401090549-bigooycypl8hej66
>>     branch nick: bzrlib
>
> ...
>
>>   File "local.py", line 351, in append_bytes
>>   File "local.py", line 328, in _get_append_file
>>   File "__init__.py", line 357, in _translate_error
>> PermissionDenied: Permission denied: "df/0001makefilenewfile.-20071213000827-9zm28j15sb7x8kdi-1.knit": [Errno 13] Permission denied: '/usr/src/build/build/ttcp/ttcp-20071212/CYGWIN-PATCHES/.bzr/repository/knits/df/0001makefilenewfile.-20071213000827-9zm28j15sb7x8kdi-1.knit'
>
> ^- Here it is just trying to open a file and write some data to it. (Most
> likely this is going to be a new file).
>
> ...
>
>> 
>> -----------------------------------------------------------------------
>> $ find .bzr/ -ls
> ...
>
>> dr-xr-xr-x   2 root     None            0 Dec 13 02:08 .bzr/repository/knits/df
>
> ^-- All of your directories are being created in readonly mode. Any idea why
> that would be happening?

This is FAT32, where permissions do not apply like in NTFS. See this:

    $ umask; echo $CYGWIN
    0022
    server

    $ touch t.tmp; ls -la t.tmp
    -rw-r--r-- 1 root None 0 Dec 13 16:38 t.tmp

    $ chmod 777 t.tmp; ls -la t.tmp
    -rw-r--r-- 1 root None 0 Dec 13 16:38 t.tmp

    $ chmod ug-r t.tmp; ls -la t.tmp
    -rw-r--r-- 1 root None 0 Dec 13 16:38 t.tmp

So all files are actually RW. How does python see the permissions? Could
you have some python test file to try?

> I believe the code tries to maintain the permissions of .bzr/, so you might try
> doing:
>
> find .bzr -type d -print0 | xargs -0 chmod 755

> And from that point you can see if it allows you to commit. I also find it odd
> that they are all 'root:None' but that may be because of FAT32.
>
> I would guess that "bzr init --pack-0.92" would be a bit easier to manage fs
> permissions (because we create packs in the same directory, rather than
> spreading them across 256 directories).

Jari





More information about the bazaar mailing list