Message388963
> What I would expect is a consistent behaviour and as a
> user I am not interested in inner guts of differences
> between filesystems.
It's already consistent. msg360033 contains a misunderstanding about what write permission on a file means in Unix. The parent directory controls whether a file can be unlinked -- except for immutable files. For example:
$ mkdir test; touch test/file.txt; chmod -w test
$ python3.8 -c "import shutil; shutil.rmtree('test')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.8/shutil.py", line 715, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/usr/lib/python3.8/shutil.py", line 672, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/usr/lib/python3.8/shutil.py", line 670, in _rmtree_safe_fd
os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'file.txt' |
|
Date |
User |
Action |
Args |
2021-03-17 20:14:04 | eryksun | set | recipients:
+ eryksun, PeterFS |
2021-03-17 20:14:04 | eryksun | set | messageid: <1616012044.04.0.371725685466.issue39340@roundup.psfhosted.org> |
2021-03-17 20:14:04 | eryksun | link | issue39340 messages |
2021-03-17 20:14:03 | eryksun | create | |
|