Skip to content

PSU does not confirm on startup if access is granted to create and append to log files in %PROGRAMDATA%\Universal #2086

@DataTraveler1

Description

@DataTraveler1

Steps to Reproduce

PSU does not confirm on startup if access is granted to create and append to log files in %PROGRAMDATA%\Universal

Steps to recreate

  1. On a clean machine, ensure that %PROGRAMDATA%\Universal directory does not exist

  2. Successfully setup and configure PSU in native (Kestrel) mode (meaning not IIS) under a service account "A". Include the service account credentials at the time of installation on the MSI install. This ensures that the %PROGRAMDATA%\Universal directory will be created by service account "A".

  3. Sanity check the installation and ensure functionality is working and logs are written to disk

  4. Stop the PSU services

  5. Change the service account that the PowerShell Universal service is using to a service account "B". This service account is identical to "A" with respect to Group Policy rights (e.g. "Logon as a batch") but it does not have write/append access to the %PROGRAMDATA%\Universal directory*.

  6. Configure ProcMon to monitor Universal.Server.exe for ACCESS DENIED events to %PROGRAMDATA%\Universal

  7. Restart the PSU service

  8. Observe that changes made to resources are not retained after restarting PSU again

  9. Observe that log data is not created

* This is because the PSU was installed under a different account

Expected behavior

PowerShell Universal should alert if it does not have access to create (and append to) log files in %PROGRAMDATA%\Universal

Actual behavior

PowerShell Universal does not alert if it does not have access to create (and append to) log files in %PROGRAMDATA%\Universal

Environment data

PSU 3.7.10

Visuals

image

(figure shows two different tabs from a single ACCESS DENIED entry observed with ProcMon)

Edit 1 fixed typo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-PlatformSpecific to platform related items.P4 - lowBug has minimal impact, general usage not affected.Size - SThis issue is a small amount of work.v5Version 5 issue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions