This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Pathlib Path.touch() seems to ignore groups write bit for mode parameter
Type: behavior Stage: resolved
Components: IO Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: SavoVuksan, ronaldoussoren
Priority: normal Keywords:

Created on 2022-01-25 11:41 by SavoVuksan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bug.py SavoVuksan, 2022-01-25 11:41 File to reproduce the bug
Messages (2)
msg411577 - (view) Author: Savo Vuksan (SavoVuksan) Date: 2022-01-25 11:41
The touch function of the Path Object in the Pathlib module seems to ignore the write bit for the second octal number for the groups permission in the mode parameter

In the provided script you can see that the output prints
-rwxr-xr--
but it should be
-rwxrwxr--

I use python 3.9 on a Linux machine running manjaro with following kernel: 5.13.19-2-MANJARO
msg411631 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2022-01-25 16:55
The touch method combines the mode you specify with the active umask (set by os.umask()).  This is fairly standard behaviour for Unix APIs that accept a file mode.

This is documented at: https://docs.python.org/3/library/pathlib.html#pathlib.Path.touch
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90672
2022-01-25 16:55:49ronaldoussorensetstatus: open -> closed

nosy: + ronaldoussoren
messages: + msg411631

resolution: not a bug
stage: resolved
2022-01-25 11:41:01SavoVuksancreate