Ubuntu – Why is running Wine with sudo dangerous

permissionsrootsudowine

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?

Best Answer

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.