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

Jari Aalto jari.aalto at cante.net
Thu Dec 13 18:12:25 GMT 2007


* Thu 2007-12-13 John Arbash Meinel <john at arbash-meinel.com>
* Message-Id: 47616617.7070502 at arbash-meinel.com
>> Excellent! This worked, thanks.
>
> Yeah, so what is happening is that we are doing (effectively):
>
> mode = os.stat('.bzr/repository').st_mode
> mode &= 07777 # Get only the user permissions
> mode &= ~07111 # Strip setgid/setuid bits and executable
>
> os.open('.bzr/repository/ff/foo.knit',
>         os.O_CREAT | os.O_WRONLY,
>         mode)
>
> And that means that we are doing "os.open()" with a default mode bits of
> readonly (since we didn't get the writable flag from the os.stat call).
>
> I find it *very* weird that on cygwin you get back a readonly directory, and
> then have no problem creating a file there.

This is simply due to FAT32, which isn't suitable for managing the
permissions correctly (those UGO bits). In NTFS the permissions would
work as in Linux.

> That said, I think the patch is reasonable. There isn't any reason why
> we would want to open a file that is not writable to the current user.
> We may or may not want it writable by group, but we'll use the bits to
> determine that.

Thanks,
Jari




More information about the bazaar mailing list