Re: Read-only error
Alan Gauld via Python-list <[email protected]> Tue, 14 Jul 2026 09:46:57 +0100
| Newsgroups | gmane.comp.python.general |
|---|---|
| Message-ID | <[email protected]> |
On 13/07/2026 17:18, Left Right via Python-list wrote: > Both users and administrators understand permissions as a reference to > ownership. Owning X gives you permissions to do with X as you please, > including deleting it. I disagree. Ownership and access are entirely different things. I can own a file and restrict my access to read-only, or not execute it etc. I can also access files that I do not own, either as part of a group, or globally or part of an ACL. Ownership does not automatically permit you to do anything to a file. And you may be able to do anything to a file you don't own. They are entirely different concepts. > the file *mode* rather than *ownership* is unhelpful. Users don't > expect file mode to affect permissions. On the contrary mode is at least as important and I would certainly expect that if I set the mode to read-only that will affect the permissions. > Bottom line: I think that having a FileReadOnly exception is a good > idea because it more precisely reports the problem and gives users a > direction for fixing it, whereas reporting permissions error doesn't. I don't disagree with this however. The more specific an error the better. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos