sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.93k stars 1.55k forks source link

Deleting content from box fail with multiple users accounts #4288

Open Ouro17 opened 1 month ago

Ouro17 commented 1 month ago

Describe what you noticed and did

  1. Create 2 local accounts users in windows (User A and B)

  2. Install sandboxie

  3. On one user(A for example), use the defaultbox

  4. log out user A and switch to the other user B

  5. On B, use the default box

  6. Try to delete the content of default box, it will fail Screenshot_2 Screenshot_1

  7. Switch back to user A

  8. Delete content on user A default box, it will work Screenshot_3 Screenshot_4

The ?? in front of the folders seems rather suspicious to me. Does any one else has the same issue?

How often did you encounter it so far?

Whenever the user that is not the first logging in the computer tries to delete contents from any boxes

Expected behavior

The content of the box should be deleted

Affected program

Not relevant

Download link

Not relevant

Where is the program located?

Not relevant to my request.

Did the program or any related process close unexpectedly?

No, not at all.

Crash dump

No response

What version of Sandboxie are you running now?

Sandboxie Plus v1.14.10

Is it a new installation of Sandboxie?

I recently did a new clean installation.

Is it a regression from previous versions?

No response

In which sandbox type you have this problem?

In a standard isolation sandbox (yellow sandbox icon).

Can you reproduce this problem on a new empty sandbox?

I can confirm it also on a new empty sandbox.

What is your Windows edition and version?

Windows 11 Pro 64 bits

In which Windows account you have this problem?

A local account (Standard user)., A local account (Administrator).

Please mention any installed security software

Microsoft Defender Antivirus

Did you previously enable some security policy settings outside Sandboxie?

No response

Trace log

No response

Sandboxie.ini configuration

[DefaultBox]
Enabled=y
BlockNetworkFiles=y
RecoverFolder=%{374DE290-123F-4565-9164-39C4925E467B}%
RecoverFolder=%Personal%
RecoverFolder=%Desktop%
BorderColor=#00ffff,ttl,6
Template=OpenBluetooth
Template=SkipHook
Template=FileCopy
Template=qWave
Template=BlockPorts
Template=LingerPrograms
Template=AutoRecoverIgnore
ConfigLevel=10
DropAdminRights=y
ClosePrintSpooler=y
UseFileDeleteV2=y
UseRegDeleteV2=y
ProcessGroup=<system>,rundll32.exe,dllhost.exe
ProcessGroup=<FirefoxServices>,RuntimeBroker.exe,CompPkgSrv.exe
ProcessGroup=<Browsers>,firefox.exe,chrome.exe
ProcessGroup=<StartRunAccess>,<system>,<FirefoxServices>,<Browsers>,explorer.exe
ProcessGroup=<InternetAccess>,<Browsers>
ClosedIpcPath=!<StartRunAccess>,*
AutoRecover=y
SandboxieLogon=y
ClosedFilePath=!<InternetAccess>,InternetAccessDevices
NeverRemove=y
ForceProcess=<Browsers>
RunCommand=Firefox|firefox.exe
RunCommand=Chrome|chrome.exe
APMichael commented 1 month ago

Have you changed the "Sandbox File Root"?

It is "\??\%SystemDrive%\Sandbox\%USER%\%SANDBOX%" by default and thus creates a separate DefaultBox for each user.

In your report, both users seem to use the same sandbox, which does not make sense. The "Sandbox File Root" should therefore contain the variable %USER%.

camheelio commented 1 month ago

I have the same problem with only one user. It happens since the update to 1.14.10, which was parallel with the Windows 11 Update 24H2 (26100). Sandboxie drop this error when trying to empty the sandbox from UI or when the content should be automatically deleted. First I though about access rights, but I can delete the sandbox folder from Explorer by hand without any problem and when I have done this, the automatically deletion works 2 or 3 times and then it happens again.

Ouro17 commented 1 month ago

Have you changed the "Sandbox File Root"?

It is "??\%SystemDrive%\Sandbox\%USER%\%SANDBOX%" by default and thus creates a separate DefaultBox for each user.

In your report, both users seem to use the same sandbox, which does not make sense. The "Sandbox File Root" should therefore contain the variable %USER%.

No, I didn't changed anything in the global configuration, only for the boxes and yes it is "??\%SystemDrive%\Sandbox\%USER%\%SANDBOX%" as you said.

It's true that in my report the users seems to be in the same sandbox, I don't know how it happened but I tried again and both sandboxies were different this time.

I had the same problem as @camheelio with one user too.

I tried to uninstall 1.14.10 and then installing 1.14.9, and the same problem happened in the very first try to delete it, even without changing users.

In another computer with Windows 10, I don't have the problem, but it was not a fresh installation, it was just updated to 1.14.10.

Can I attach anything that you consider relevant to the issue?

APMichael commented 1 month ago

I myself only use Windows 10 so far and the issue has never occurred there.

I guess it is caused by Windows 11, either by a recent update or by the feature upgrade 24H2. (https://www.wilderssecurity.com/threads/sandboxie-plus-1-14-10.455134/#post-3211299)

Maybe @DavidXanatos can reproduce it in his VM and find out what caused it?

offhub commented 1 month ago

Duplicate of #4142

Gishmasters commented 1 month ago

I Think problem on this moment - C:\Sandbox\%SANDBOX% - if rename %SANDBOX% to another name foe Example BOX1, and reboot then all works without problem. But after another reboot C:\Sandbox\BOX1 suddenly rename to C:\Sandbox\%SANDBOX% and deleting is broke.

Gishmasters commented 3 weeks ago

Hello, DavidXanatos! Did you check this issue? Will it be resolve soon :))) Problem only on Win 11 24H2, and what interesting - if restart sandbox with admin rights - then no problem with sandbox emptying. But somethimes after pc rebooting problem appear again. So i think is some issue with rights are present.

mr3chitk commented 1 week ago

Another workaround is ticking the "Use volume serial numbers for drivers" in File Options.

Gishmasters commented 5 days ago

Another workaround is ticking the "Use volume serial numbers for drivers" in File Options.

Sadly to say, but it doesnt help. I hope DavidXanatos will solve this soon. I repeat that is actual for win11 24h2 users, on any other(23h2 or on win10) it doesnt happens.

camheelio commented 5 days ago

A working woraround is, to create an automated action (Advanced Options -> Triggers) when sandbox is terminated with the command:

C:\windows\system32\cmd.exe /c rmdir /s /q [sandboxfolder]

insert your sandbox path at the end (I have not tested if you can use the %SANDBOX% placeholder to make it working with different user-sandboxes; using environment variables like %WINDIR% is definitvely not working) Then you should remove the check from "Auto delete content ..." It will do technically the same as the option, removing the complete folder for this sandbox when the last process inside is closed.