hybinet wrote:
A script could try running sudo all day long, but it won't succeed unless the username is in the sudoers file and the script knows the password. (There are ways to use sudo without passwords, but those are not enabled by default for a very good reason.)
Brute force attacks through su or sudo

hybinet wrote:
Ubuntu's default user can use sudo, but AFAIK there is no default user in Linode's version of Ubuntu. Any user you create on a Linode (using the useradd command) is completely non-privileged. There is no difference between www-data and a new user in that regard.
I thought Ubuntu has the root user locked out completely and required sudo for doing root-only stuff? In my few experiences using Ubuntu, I never tried to su to root, but I'm fairly sure I read somewhere that this was the case.
hybinet wrote:
Having web files owned by www-data is definitely better than having them owned by root. I don't dispute that. But you can make your server even more secure by creating a non-privileged user for each site and having them own their respective files.
Hmm... 8 sites, 1 person to remember 8 users and 8 passwords for those 8 sites... my brain hirtz already!
hybinet wrote:
Besides, if the files were owned by www-data, you'd have to log in as www-data (or even worse, root) in order to manage them. You would probably want SFTP access for www-data, or maybe even shell access. But it's a bad idea allow logins or give shell access to a user that runs a public-facing daemon. By default, www-data doesn't even have a password.
Of course www-data shouldn't have shell access!
You do have a point: if my brain could remember 8 users and 8 passwords, and I hacked up my system to prevent those users from using su (or at least using su to switch to a privileged user or one of the other 7 users), then that would be more secure than using www-data.
The lazy man's workaround: Disable passwords and root logins in ssh and use an obscure passphrase on one's ssh keys
