PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

File Locksmith does not recognize files locked by the system user

Open caiocinel opened this issue 3 years ago • 11 comments

Microsoft PowerToys version

0.64.0

Installation method

GitHub

Running as admin

Yes

Area(s) with issue?

File Locksmith

Steps to reproduce

With a Firebird 2.0 database classic server instance, just connect to a database file.

Image: image

Bug Report: PowerToysReport_2022-11-03-09-08-07.zip

✔️ Expected Behavior

The database file should be displayed as in use by the related process.

❌ Actual Behavior

No results are found

Other Software

Firebird 2.0

caiocinel avatar Nov 03 '22 12:11 caiocinel

@caiocinel Did you run FLS with admin permission and what user is running the firebird service?

htcfreek avatar Nov 03 '22 12:11 htcfreek

Wonder if a /bugreport would help here to see if there's some error.

jaimecbernardo avatar Nov 03 '22 12:11 jaimecbernardo

Hi there!

We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!
Report Bug

ghost avatar Nov 03 '22 12:11 ghost

@caiocinel Did you run FLS with admin permission and what user is running the firebird service?

I used the "Restart as Administrator" button from the utility itself, the server runs under the "SYSTEM" user

Wonder if a /bugreport would help here to see if there's some error.

PowerToysReport_2022-11-03-09-08-07.zip

caiocinel avatar Nov 03 '22 13:11 caiocinel

I can reproduce the bug. You can only see processes that have the same or a lower permission level. Even an administrator (uac) can't see processes running as system.

@jaimecbernardo , @ivanstosic-janea What access permission do we use for query the process data?

htcfreek avatar Nov 03 '22 13:11 htcfreek

I believe we don't do too much with permissions here. I see we have to use "SeDebugPrivilege" in order to get system or other processes information. I'll see what can be done here.

jaimecbernardo avatar Nov 03 '22 15:11 jaimecbernardo

I fixed it. Should probably get some UI warning in here for system processes, though. image

jaimecbernardo avatar Nov 03 '22 15:11 jaimecbernardo

I fixed it. Should probably get some UI warning in here for system processes, though. image

Do we request aknowledge on killing a process? If yes we cann add an additional sentence to war for system processes and my processes of other users too.

htcfreek avatar Nov 03 '22 16:11 htcfreek

I fixed it. Should probably get some UI warning in here for system processes, though. image

Do we request aknowledge on killing a process? If yes we cann add an additional sentence to war for system processes and my processes of other users too.

htcfreek avatar Nov 03 '22 16:11 htcfreek

Going with an icon with tooltip currently: image

jaimecbernardo avatar Nov 03 '22 16:11 jaimecbernardo

Opened a PR with the fix: https://github.com/microsoft/PowerToys/pull/21688

jaimecbernardo avatar Nov 03 '22 17:11 jaimecbernardo

Fixed in the latest version. Please update PowerToys.

jaimecbernardo avatar Nov 14 '22 22:11 jaimecbernardo