client icon indicating copy to clipboard operation
client copied to clipboard

Let the installer set permissions for ProgramData\FAForever

Open muellni opened this issue 8 years ago • 3 comments

Some people reported to have no write access to C:\ProgramData\FAForever and need to run the client as Administrator. The installer MUST fix it, since it introduced #401 . Could be fixed along with #470 once we figure out how to run admin scripts on installation. PR #484 tries that...

muellni avatar Nov 14 '16 10:11 muellni

Here is some information about setting permissions: http://msiworld.blogspot.de/2008/11/different-ways-of-giving-permissions-in.html

using any of those options probably means hacking up the bdist_msi module.

duk3luk3 avatar Nov 15 '16 19:11 duk3luk3

I run FAF 'as admin' (shows the mostly empty client), after that I could run FAF normal again. (all .log files are still owned by user) then I deleted forever.log and repeated it -> a forever.log was created under owner admin and FAF could not start as normal user after that. So I would guess (as normal user can't take that owner ship) log file creation/rotation should make sure that owner of forever.log is proper inherited. I used this to see the owner: > dir %ProgramData%\FAForever\logs /q

GrotheFAF avatar Nov 30 '16 18:11 GrotheFAF

if it is just about forever.log, there should be something like this in log-rotation after log-rotation and new forever.log creation: if ctypes.windll.shell32.IsUserAnAdmin(): os.system("icacls %ProgramData%\FAForever\logs\forever.log /setowner %USERNAME%") os.system("icacls %ProgramData%\FAForever\logs\forever.log /reset") I tested this (with dosbox, not in client code) and it works.

GrotheFAF avatar Dec 01 '16 22:12 GrotheFAF