Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write username into log file to fix permission issues #64

Merged
merged 2 commits into from
Oct 28, 2022
Merged

Write username into log file to fix permission issues #64

merged 2 commits into from
Oct 28, 2022

Conversation

FaserF
Copy link
Contributor

@FaserF FaserF commented Oct 28, 2022

We had an issue if a user installs a system application from Intune first (which creates the install.log file), and afterwards a user installed a app (Greenshot) in user context with Intune which then threw a permission error.
An easy fix (which also makes the logs better readable in my case) is to append a username to the log file name.

image

@Romanitho
Copy link
Owner

Thank you 😉

@Romanitho Romanitho merged commit 57973f2 into Romanitho:main Oct 28, 2022
@KnifMelti
Copy link
Contributor

KnifMelti commented Oct 29, 2022

Doesn't this assume that the $LogPath is writable in usercontext, or am I totally wrong?
EDIT: In Programdata there's this user right, but elsewhere (if WAU is installed in a custom path or $LogPath is defined in a parameter)?

@Romanitho
Copy link
Owner

Very true. We probably need to conciser log folder as read/write for user too, no ?

@KnifMelti
Copy link
Contributor

KnifMelti commented Oct 29, 2022

...or leave it to the admin (if it's on a share etc.)

@Romanitho
Copy link
Owner

true. We have something working for most of all. Is someone decide to use specific config things need to be adapted. But we cannot manage all of scenarios

@KnifMelti
Copy link
Contributor

KnifMelti commented Oct 29, 2022

if user / is $LogPath writable/else $LogPath = "$env:ProgramData\Winget-AutoUpdate\Logs"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants