Why is running Wine with sudo dangerous?
Solution 1
Here is the explanation from the official Wine FAQ:
6.2 Should I run Wine as root?
NEVER run Wine as root! Doing so gives Windows programs (and viruses) full access to your computer and every piece of media attached to it. Running with
sudo
also has these same risks but with the added bonus of breaking the permissions on your~/.wine
folder in the process. If you have run Wine withsudo
you need to fix the permission errors as described in the next question, and then runwinecfg
to set Wine up again. You should always run Wine as the normal user you use to login.For Linux systems, all ideas that Wine needs root can be solved through Posix Capabilities or Posix File Capabilities or correcting other security settings.
As far as Windows programs are concerned, you are running with administrator privileges. If an application complains about a lack of administrator privileges, file a bug; running Wine as root probably won't help.
Solution 2
Because if you run WINE as root, Windows malware would be able to wipe your hard drive, or any other detrimental task that requires administrator privileges.
Solution 3
You could become victim to Wanna Cry Ransomware when running as sudo
. This was confirmed in two separate answers.
You could become victim to the Petya Ransomware when running as root as per the accepted answer.
To summarize as a Linux user you too can fall victim to the most famous $300 bitcoin in payment Ransomwares of 2017 only if you run wine
with sudo
and get infected.
Related videos on Youtube
![Tech2025](https://lh4.googleusercontent.com/-Pj2PI7LJs6w/AAAAAAAAAAI/AAAAAAAAJHA/OksJSsFQ_iw/photo.jpg?sz=256)
Tech2025
Updated on September 18, 2022Comments
-
Tech2025 almost 2 years
I'm trying to run a program in Wine with administrator privileges.
However, I have read that this is dangerous, but I don't understand the reason.
Can anybody please explain to me why I should not run Wine with
sudo
? -
Tech2025 almost 7 yearsThank you, I thought it might have been something like that but Im new to linux so really have no idea P:
-
flarn2006 about 5 yearsI mean, isn't that just the same advice that applies when running any binary as root? Sure, there's tons more malware for Windows than there is for Linux, but as the Windows program you're running is trustworthy, is it really any more dangerous than running an equally-trustworthy native Linux binary as root?
-
Shawn Eary over 2 yearsJust for evaluation purposes, the Jan 14, 2022 copy of PBIDesktopSetup_x64.exe won't even start unless I run wine via the root account. It just complains with ole:CoGetClassObject errors unless I'm root. wine-5.0.3 (Debian 5.0.3-3)