News for hackers. Stuff that matters.
Re:Is Sudo Almost Useless? by parliament32 on Tuesday June 09, 2020 @03:41PM (#23470061)
An unprivileged user can't do that. /var/www/ will be owned either by root, or (by default on debian, depends on your distro) www-data. Your unprivileged user can't modify other users' files, that's the entire point of unix permissions.
Re:Is Sudo Almost Useless? by dependenttypes on Tuesday June 09, 2020 @04:01PM (#23470264)
Given

> >Plus, there's still a lot of damage you can do without root access.

> That's not really true. An unprivileged user

We can see that "unprivileged user" equals to anything that is not root in your post. Considering that definition www-data is an unprivileged user which can delete everything under /var/www/.

So no, what you are saying is not really true.

Re:Is Sudo Almost Useless? by parliament32 on Tuesday June 09, 2020 @04:14PM (#23470385)
But www-data doesn't get a login shell, so it can't[1].

Obviously a user can modify their own files. The idea is if you compromise unprivileged user "scott", with their account, you can't harm other users or the system itself.

[1]easily. Technically it depends, but a hardened configuration would only give www-data permissions to read files its data files in /var/www, not write them (which includes delete), apart from things it actually needs to write like its app logs (and even then you should be using syslog facilities, which only let you write, again not delete or cause any issues). Principal of least privilege and all that. For fun, try to figure out how to ssh into your system as www-data and see the half dozen different roadblocks that come up in your way.