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.

Author eryksun
Recipients eryksun, ncoghlan, steve.dower, terry.reedy
Date 2015-03-11.18:50:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426099839.94.0.359556636937.issue23633@psf.upfronthosting.co.za>
In-reply-to
Content
> Specifying %LOCALAPPDATA% should be sufficient, though 
> %USERPROFILE% (e.g. C:\Users\Steve) would also be okay.

The command using %USERPROFILE% was for XP (NT 5.1), since the %LOCALAPPDATA% environment variable was added in Vista (NT 6.0).

> %ProgramData% is not writable by limited users, but we 
> don't want the global .ini to be editable by non-admin 
> users. That said, even admins aren't supposed to go 
> editing stuff in %ProgramData%, as I understand it.

    C:\>icacls "%ProgramData%"
    C:\ProgramData NT AUTHORITY\SYSTEM:(OI)(CI)(F)
                   BUILTIN\Administrators:(OI)(CI)(F)
                   CREATOR OWNER:(OI)(CI)(IO)(F)
                   BUILTIN\Users:(OI)(CI)(RX)
                   BUILTIN\Users:(CI)(WD,AD,WEA,WA)

All users have the right to create files and directories here (i.e. (CI)(WD,AD,WEA,WA)), and by "CREATOR OWNER" they have full control of the files they create. So obviously if a system account or administrator creates the .ini, then non-admin users won't be able to edit it.

> I think having "alongside the EXE or in %LOCALAPPDATA%" is fine.

Editing an .ini in %SystemRoot% feels a bit weird, like something out of NT 4 in the 1990s. Really it belongs in %ProgramData%, not that there's anything wrong with checking for it alongside the executable as well. I just think it wouldn't hurt to check in both locations.
History
Date User Action Args
2015-03-11 18:50:39eryksunsetrecipients: + eryksun, terry.reedy, ncoghlan, steve.dower
2015-03-11 18:50:39eryksunsetmessageid: <1426099839.94.0.359556636937.issue23633@psf.upfronthosting.co.za>
2015-03-11 18:50:39eryksunlinkissue23633 messages
2015-03-11 18:50:39eryksuncreate
Morty Proxy This is a proxified and sanitized view of the page, visit original site.