Message378690
Trying to write into a file fails with a PermissionError (PermissionError: [Errno 13] Permission denied:).
Typing in a non-elevated shell (User is Administrator)
C:\Users\Username\Desktop>C:\Python38-32\python.exe
open("some_file.txt","w") fails on the Desktop, in the user directory and in directories where Administrators are permitted to write (while normal users can only read and execute).
(Permissions for the user in those directories:
Desktop rwx,
Username-directory rwx,
third-location r-x for users/rwx for Administrator-user-group (with non-elevated applications))
I can write to all these places without elevation using the shell or standard applications like notepad.exe.
Why do I have to elevate the Python-process to access such functionality? Is this related to the security-settings on python.exe or its installation-directory location?
Forcing a user to elevate the user-launched process for tasks that operate on normal user-writable files feels like a light security-risk. Because they get used to elevate Python-scripts even if the performed task by itself would not require it.
What changed compared to Python 2? |
|
Date |
User |
Action |
Args |
2020-10-15 17:36:33 | john_miller | set | recipients:
+ john_miller, paul.moore, tim.golden, zach.ware, steve.dower |
2020-10-15 17:36:32 | john_miller | set | messageid: <1602783392.97.0.0712436068375.issue42046@roundup.psfhosted.org> |
2020-10-15 17:36:32 | john_miller | link | issue42046 messages |
2020-10-15 17:36:32 | john_miller | create | |
|