protonscr

Steam Error: Cannot run as root user.

steamclosed reviewed
ValveSoftware/steam-for-linux#2317 · opened 2013-04-13 by mtcamesao · updated 2025-05-06 · 28 comments · github
Mmtcamesao 2013-04-13 github

I keep getting this error when I try to run steam on my Ubuntu 12.10 server :/

Does anyone know a quick fix for this?

Here is a picture of the message I get.
http://gyazo.com/4b75f7b261a618f6afa1832fc8f71bba

TTele42 2013-04-13 github

If you want to run steam on an ubuntu server, make a regular user and run it from there, steam is not allowed to be run as root due to the gratuitous security vulnerability when it is given unrestricted access.

Mmmstick 2013-04-14 github

You are never supposed to run programs as root, server or not. Root should be disabled on servers.

Bbreznak 2013-04-16 github

Please close as INVALID/WONTFIX

Ggdrewb-valve maintainer 2013-04-16 github

We don't have any plans to allow Steam to run as root, primarily for security reasons. Closing this as it's unlikely to change in the future.

GgonX 2013-05-18 github

At least add a command line option like --i-really-know-what-im-doing-please-run-as-root

Different strokes for different folks. There's no need to enforce your methods on others, especially on such a customizable system as Linux. It'd be the same to prevent Windows users from running Steam unless they're starting it from a limited (non-admin) account.

TTele42 2013-05-18 github

@gonX If you really know what you're doing, then it is easy to get around that security measure. Just don't look to Valve to clean up your mess when something goes horribly wrong.

GgonX 2013-05-18 github

@Tele42 It's not about that I can't start it, it's just about editing the wrapper, but every time Steam updates I'll have to go in and make that change manually.

Mmmstick 2013-05-18 github

If you really know what you are doing, you wouldn't be running Steam as root. There is absolutely no reason for anyone to run Steam as root at all.

PPon3 2013-11-18 github

OMG.

  1. Open /usr/bin/steam
  2. Comment or delete such lines:
    if [ "$(id -u)" == "0" ]; then
    show_message --error $"Cannot run as root user"
    exit 1
    fi
BBitLurker 2013-12-05 github

Thanks Pon3 i am using Fedora 19 xfce 64 bits and now steam is running!

Rryujeff12 2013-12-13 github

what if i am running Kali Linux and i want to do both gaming and penetration study instead of rebooting into windows?
i wish i can run certain applications as non-root user.

Mmmstick 2013-12-13 github

Then you'd be a fool. I question your practices.

Mmmstick 2016-04-14 github

@PeterDCarter OpenSUSE Tumbleweed does not default to a root user, and you should never be using a root account.

Wwayfar3r 2017-08-18 github

@mmstick If you cannot be root without breaking anything or exposing your system, then you shouldn't use Linux at all. It's stupid to restrict people from running anything as root just because some idiots ignore all warnings and expose their system. They deserve to have their system broken or hacked.

Ssh-hugo 2018-01-18 github

nano /usr/bin/steam
find if [ "$(id -u)" == "0" ];
rename
if [ "$(id -u)" == "1" ];
Launch Steam
Bohhaa!

HH3x4l07 2019-03-14 github

if you are a kali linux user or the such and you must do it here is how.

https://forums.kali.org/showthread.php?20192-How-to-install-Steam-on-Kali-)

you are welcome.

HH3x4l07 2019-03-14 github

what if i am running Kali Linux and i want to do both gaming and penetration study instead of rebooting into windows?
i wish i can run certain applications as non-root user.

edit your steam file in usr/bin with a text editor use find and search root.. change 0 to 1 save then open steam. if that confuses you look over this link.

https://forums.kali.org/showthread.php?20192-How-to-install-Steam-on-Kali-)

?ghost 2019-09-28 github

That's what you get for telling people not to run steam as root,
they find how to run steam as root anyway

Mmmstick 2021-07-12 github

@flaing This is spam.

Mmmstick 2021-07-12 github

@mmstick If you cannot be root without breaking anything or exposing your system, then you shouldn't use Linux at all. It's stupid to restrict people from running anything as root just because some idiots ignore all warnings and expose their system. They deserve to have their system broken or hacked.

Name one reason why people should be using a root account as a user account. There are none. Besides the obvious security problems, launching applications as root causes a lot of permission issues. There's nothing stopping anyone on this thread from launching Steam from a user account. There's no reason to go out of your way to actively attempt to break your system by using root for no reason at all.

Ggmankab 2022-05-02 github

nano /usr/bin/steam find if [ "$(id -u)" == "0" ]; rename if [ "$(id -u)" == "1" ]; Launch Steam Bohhaa!

is there any solution for flatpack?

Jjulkiewicz 2023-03-18 github

"Name one reason why people should be using a root account"

There are actually plenty of CI related use cases where root is the only user inside docker.

Mmmstick 2023-03-19 github

"Name one reason why people should be using a root account"

There are actually plenty of CI related use cases where root is the only user inside docker.

This is false. Docker documentation declares that you should create a non-root user in the Dockerfile, and generally should avoid root because it is more secure.

Jjulkiewicz 2023-03-19 github

And yet, the most popular testing docker images for Unity for CI don't have a special user.

I'm not going to rewrite that entire docker image to get the tool to work.

To be clear, I myself was surprised it runs Unity as root and I would much prefer for it not to. That being said, it is what it is. I spent more time than I probably should trying to get it to run as non-root.

Uudance4ever 2024-07-09 github

is there any solution for flatpack?

yes - I updated instead of /usr/bin/steam go to the root of your flatpak install directory and find bin_steam.sh - for me it was:

flatpak/binaries/app/com.valvesoftware.Steam/x86_64/stable/173cd565d98d4951bd858bad290e8481a9e72dbf5f7c9c980165a060666184b1/files/lib/steam/bin_steam.eh

thank you for the easy patch.

Aalexionut-tincu 2025-05-06 github

@mmstick If you cannot be root without breaking anything or exposing your system, then you shouldn't use Linux at all. It's stupid to restrict people from running anything as root just because some idiots ignore all warnings and expose their system. They deserve to have their system broken or hacked.

Name one reason why people should be using a root account as a user account. There are none. Besides the obvious security problems, launching applications as root causes a lot of permission issues. There's nothing stopping anyone on this thread from launching Steam from a user account. There's no reason to go out of your way to actively attempt to break your system by using root for no reason at all.

Simple example. I tried adding an additional drive to steam from Settings > Storage. It failed, because of permission error.

Mmmstick 2025-05-06 github

@alexionut-tincu Not needed to have root to do that. If this is a flatpak version of Steam, use Flatseal to give it permission to that directory.

Nothing extracted yet.