Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
12 years, 4 months ago
So I need a server that will host only 1 website. I will install debian as O.S.
I want to know: do I need to setup an user to do my stuff or, considering I will the only user of the server, I can use the root user to login via ssh and to do all my stuff?
Thanks for any suggestions, i am pretty new to this word.
Jan 23, 2011 at 11:55
740 6 6 gold badges 17 17 silver badges 31 31 bronze badges
Duncmc is exactly right. "It's good practice to disable root login via SSH. Set yourself up with a user account which you use to SSH in and then use sudo for any administration tasks."
I would go farther and say best practice.
Next apache should have its own user and group.
In your httpd.conf there are several configuration options you should change.
LimitRequestBody (1.5x the size of your biggest possible page)
Remove Aliases for icons documents and error.
Here is a decent starting point.
Jan 23, 2011 at 14:48
You can do whatever you want as root, but apps such as Apache shall have own account, because if someone get in through it, they won't have root rights.
Jan 23, 2011 at 12:04
1,231 1 1 gold badge 19 19 silver badges 26 26 bronze badges
You are probably better off with "log in as a normal user, use
sudo to gain root proivileges" and "any external-facing service runs as its own user" (ssh will, by necessity need to be running as root).
Main reason is that "log on as non-root, elevate privileges" allows you to block remote root login and log any escalation (ideally to a remote log server) and by running services segregated in "privilege space", the chances of one service causing an exploitable hole in another is minimized (and any penetration has a bigger chance of being contained).
Jan 23, 2011 at 13:58
5,420 24 24 silver badges 24 24 bronze badges
It's good practice to disable root login via SSH. Set yourself up with a user account which you use to SSH in and then use sudo for any administration tasks.
Jan 23, 2011 at 14:00
175 2 2 silver badges 8 8 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only