The difference is who has access to the file.
As you're aware, there are three unique permission bits: the user (
u), the group (
g), and others (
o). Each one of these can be treated differently depending on the set bits.
For example, if a file is set to permissions 770 (
rwxrwx---), it means both the owning user and owning group can read, write, and execute the file. If we disable the write bit for the group (resulting in
rwxr-x---), it means the owning group can read and execute the file, but not edit it.
So, why is this important? Say you're on a server with a bunch of other people making a website. All of these users are in a group we're going to call
developers. We need all of the
developers to be able to write to the file, so we give the group read and write permissions. This way, every
developer can access the files they need.
Now, let's say there's a folder in our fictional work environment that
developers should be able to see, but not change. In that folder, we remove the write permission from the group. This allows devs to see it (and optionally run it), but not change it.
However, as the root user, things are different. Root can already do whatever they want, so it doesn't really matter. It's important to note, though, that when
root:root owns a file and write permissions are off for other users, nobody else can edit that file. This is very often used for system configurations that only admin users can touch.
Now, what this means for your two questions:
- When you're the owning user and
root is the owning group - you control the file entirely, and can set (useless) permissions for root. Similarly, members of the group
root (normally just
root) can use the file according to the set permissions.
- When you're both the owning user and group - you control the file even more entirely. Only your user and your personal group are "owners" and everyone else goes through the "others" permission set.
Functionally on most modern systems, though, there is no difference between modes 1 and 2.