6

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?

Byte Commander
  • 110,243

3 Answers3

7

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 with sudo you need to fix the permission errors as described in the next question, and then run winecfg 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.

Byte Commander
  • 110,243
4

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.

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.