What is the difference between the default user group and root group?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
Suppose I have a directory with default permission
drwxr-xr-x 4 root root 4096 Dec 11 23:47 webtorrent-desktop/
I will Change only the owner
$ sudo chown -R sandy webtorrent-desktop
drwxr-xr-x 4 sandy root 4096 Dec 11 23:47 webtorrent-desktop/
Now I will change the group as well
$ sudo chown -R sandy: webtorrent-desktop <br>
drwxr-xr-x 4 sandy sandy 4096 Dec 11 23:47 webtorrent-desktop/
So, my question is what is the difference between these two
1) I am owner of the file or directory but it's group is root
2) I am owner of the file or directory and group is also mine.
And will I need root permission for some operation in 1st case
permissions filesystem user-management groups
add a comment |Â
up vote
0
down vote
favorite
Suppose I have a directory with default permission
drwxr-xr-x 4 root root 4096 Dec 11 23:47 webtorrent-desktop/
I will Change only the owner
$ sudo chown -R sandy webtorrent-desktop
drwxr-xr-x 4 sandy root 4096 Dec 11 23:47 webtorrent-desktop/
Now I will change the group as well
$ sudo chown -R sandy: webtorrent-desktop <br>
drwxr-xr-x 4 sandy sandy 4096 Dec 11 23:47 webtorrent-desktop/
So, my question is what is the difference between these two
1) I am owner of the file or directory but it's group is root
2) I am owner of the file or directory and group is also mine.
And will I need root permission for some operation in 1st case
permissions filesystem user-management groups
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Suppose I have a directory with default permission
drwxr-xr-x 4 root root 4096 Dec 11 23:47 webtorrent-desktop/
I will Change only the owner
$ sudo chown -R sandy webtorrent-desktop
drwxr-xr-x 4 sandy root 4096 Dec 11 23:47 webtorrent-desktop/
Now I will change the group as well
$ sudo chown -R sandy: webtorrent-desktop <br>
drwxr-xr-x 4 sandy sandy 4096 Dec 11 23:47 webtorrent-desktop/
So, my question is what is the difference between these two
1) I am owner of the file or directory but it's group is root
2) I am owner of the file or directory and group is also mine.
And will I need root permission for some operation in 1st case
permissions filesystem user-management groups
Suppose I have a directory with default permission
drwxr-xr-x 4 root root 4096 Dec 11 23:47 webtorrent-desktop/
I will Change only the owner
$ sudo chown -R sandy webtorrent-desktop
drwxr-xr-x 4 sandy root 4096 Dec 11 23:47 webtorrent-desktop/
Now I will change the group as well
$ sudo chown -R sandy: webtorrent-desktop <br>
drwxr-xr-x 4 sandy sandy 4096 Dec 11 23:47 webtorrent-desktop/
So, my question is what is the difference between these two
1) I am owner of the file or directory but it's group is root
2) I am owner of the file or directory and group is also mine.
And will I need root permission for some operation in 1st case
permissions filesystem user-management groups
permissions filesystem user-management groups
asked Feb 25 at 5:39
![](https://i.stack.imgur.com/TXjKU.jpg?s=32&g=1)
![](https://i.stack.imgur.com/TXjKU.jpg?s=32&g=1)
Kashyap Kansara
18817
18817
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
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 developer
s 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 developer
s 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 grouproot
(normally justroot
) 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.
Thank you very much for taking your time to write really detailed answer.
â Kashyap Kansara
Feb 25 at 14:28
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
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 developer
s 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 developer
s 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 grouproot
(normally justroot
) 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.
Thank you very much for taking your time to write really detailed answer.
â Kashyap Kansara
Feb 25 at 14:28
add a comment |Â
up vote
1
down vote
accepted
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 developer
s 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 developer
s 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 grouproot
(normally justroot
) 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.
Thank you very much for taking your time to write really detailed answer.
â Kashyap Kansara
Feb 25 at 14:28
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
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 developer
s 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 developer
s 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 grouproot
(normally justroot
) 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.
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 developer
s 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 developer
s 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 grouproot
(normally justroot
) 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.
answered Feb 25 at 6:08
Kaz Wolfe
25.6k1371131
25.6k1371131
Thank you very much for taking your time to write really detailed answer.
â Kashyap Kansara
Feb 25 at 14:28
add a comment |Â
Thank you very much for taking your time to write really detailed answer.
â Kashyap Kansara
Feb 25 at 14:28
Thank you very much for taking your time to write really detailed answer.
â Kashyap Kansara
Feb 25 at 14:28
Thank you very much for taking your time to write really detailed answer.
â Kashyap Kansara
Feb 25 at 14:28
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1009508%2fwhat-is-the-difference-between-the-default-user-group-and-root-group%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password