Why should the rootfs have root ownership
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
The question maybe odd but i didnôt find any explanation to it, so:
Sevreral tools for generating rootfs use fakeroot in order to fake the permissions, create the rootfs and then archive it. After that when the archive will be extracted it will be seen by the kernel as having root ownership.
My question is why the linux kernel expects that the rootfs has root ownership?
linux kernel root-filesystem ownership
add a comment |Â
up vote
0
down vote
favorite
The question maybe odd but i didnôt find any explanation to it, so:
Sevreral tools for generating rootfs use fakeroot in order to fake the permissions, create the rootfs and then archive it. After that when the archive will be extracted it will be seen by the kernel as having root ownership.
My question is why the linux kernel expects that the rootfs has root ownership?
linux kernel root-filesystem ownership
What makes you think that the kernel expects this?
â JdeBP
Oct 10 '17 at 5:11
@JdeBP, because if the ownership of the rootfs is different than root, the kernel will fail to mount it.
â Mouin
Oct 10 '17 at 7:04
The vanilla kernel has no such restriction, to my knowledge. So again: What makes you think that the kernel expects this? What error message have you seen, and where?
â JdeBP
Oct 10 '17 at 10:12
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The question maybe odd but i didnôt find any explanation to it, so:
Sevreral tools for generating rootfs use fakeroot in order to fake the permissions, create the rootfs and then archive it. After that when the archive will be extracted it will be seen by the kernel as having root ownership.
My question is why the linux kernel expects that the rootfs has root ownership?
linux kernel root-filesystem ownership
The question maybe odd but i didnôt find any explanation to it, so:
Sevreral tools for generating rootfs use fakeroot in order to fake the permissions, create the rootfs and then archive it. After that when the archive will be extracted it will be seen by the kernel as having root ownership.
My question is why the linux kernel expects that the rootfs has root ownership?
linux kernel root-filesystem ownership
linux kernel root-filesystem ownership
asked Oct 9 '17 at 14:49
Mouin
125128
125128
What makes you think that the kernel expects this?
â JdeBP
Oct 10 '17 at 5:11
@JdeBP, because if the ownership of the rootfs is different than root, the kernel will fail to mount it.
â Mouin
Oct 10 '17 at 7:04
The vanilla kernel has no such restriction, to my knowledge. So again: What makes you think that the kernel expects this? What error message have you seen, and where?
â JdeBP
Oct 10 '17 at 10:12
add a comment |Â
What makes you think that the kernel expects this?
â JdeBP
Oct 10 '17 at 5:11
@JdeBP, because if the ownership of the rootfs is different than root, the kernel will fail to mount it.
â Mouin
Oct 10 '17 at 7:04
The vanilla kernel has no such restriction, to my knowledge. So again: What makes you think that the kernel expects this? What error message have you seen, and where?
â JdeBP
Oct 10 '17 at 10:12
What makes you think that the kernel expects this?
â JdeBP
Oct 10 '17 at 5:11
What makes you think that the kernel expects this?
â JdeBP
Oct 10 '17 at 5:11
@JdeBP, because if the ownership of the rootfs is different than root, the kernel will fail to mount it.
â Mouin
Oct 10 '17 at 7:04
@JdeBP, because if the ownership of the rootfs is different than root, the kernel will fail to mount it.
â Mouin
Oct 10 '17 at 7:04
The vanilla kernel has no such restriction, to my knowledge. So again: What makes you think that the kernel expects this? What error message have you seen, and where?
â JdeBP
Oct 10 '17 at 10:12
The vanilla kernel has no such restriction, to my knowledge. So again: What makes you think that the kernel expects this? What error message have you seen, and where?
â JdeBP
Oct 10 '17 at 10:12
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
Because otherwise the owner of the root directory would be able to escalate privileges to root
, f.i. by renaming /etc
and creating a new one, and a new /etc/passwd
.
I am not sure to understand, but what i mean is that the kernel fails to mount the rootfs if it s not root
â Mouin
Oct 10 '17 at 7:26
You asked why does the kernel do that, I gave you a plausible reason. Is that the definitive answer? No idea, you'll have to ask Linus for that. shrug
â Satà  Katsura
Oct 10 '17 at 7:30
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
Because otherwise the owner of the root directory would be able to escalate privileges to root
, f.i. by renaming /etc
and creating a new one, and a new /etc/passwd
.
I am not sure to understand, but what i mean is that the kernel fails to mount the rootfs if it s not root
â Mouin
Oct 10 '17 at 7:26
You asked why does the kernel do that, I gave you a plausible reason. Is that the definitive answer? No idea, you'll have to ask Linus for that. shrug
â Satà  Katsura
Oct 10 '17 at 7:30
add a comment |Â
up vote
1
down vote
Because otherwise the owner of the root directory would be able to escalate privileges to root
, f.i. by renaming /etc
and creating a new one, and a new /etc/passwd
.
I am not sure to understand, but what i mean is that the kernel fails to mount the rootfs if it s not root
â Mouin
Oct 10 '17 at 7:26
You asked why does the kernel do that, I gave you a plausible reason. Is that the definitive answer? No idea, you'll have to ask Linus for that. shrug
â Satà  Katsura
Oct 10 '17 at 7:30
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Because otherwise the owner of the root directory would be able to escalate privileges to root
, f.i. by renaming /etc
and creating a new one, and a new /etc/passwd
.
Because otherwise the owner of the root directory would be able to escalate privileges to root
, f.i. by renaming /etc
and creating a new one, and a new /etc/passwd
.
answered Oct 9 '17 at 18:04
Satà  Katsura
10.7k11533
10.7k11533
I am not sure to understand, but what i mean is that the kernel fails to mount the rootfs if it s not root
â Mouin
Oct 10 '17 at 7:26
You asked why does the kernel do that, I gave you a plausible reason. Is that the definitive answer? No idea, you'll have to ask Linus for that. shrug
â Satà  Katsura
Oct 10 '17 at 7:30
add a comment |Â
I am not sure to understand, but what i mean is that the kernel fails to mount the rootfs if it s not root
â Mouin
Oct 10 '17 at 7:26
You asked why does the kernel do that, I gave you a plausible reason. Is that the definitive answer? No idea, you'll have to ask Linus for that. shrug
â Satà  Katsura
Oct 10 '17 at 7:30
I am not sure to understand, but what i mean is that the kernel fails to mount the rootfs if it s not root
â Mouin
Oct 10 '17 at 7:26
I am not sure to understand, but what i mean is that the kernel fails to mount the rootfs if it s not root
â Mouin
Oct 10 '17 at 7:26
You asked why does the kernel do that, I gave you a plausible reason. Is that the definitive answer? No idea, you'll have to ask Linus for that. shrug
â Satà  Katsura
Oct 10 '17 at 7:30
You asked why does the kernel do that, I gave you a plausible reason. Is that the definitive answer? No idea, you'll have to ask Linus for that. shrug
â Satà  Katsura
Oct 10 '17 at 7:30
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
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%2funix.stackexchange.com%2fquestions%2f397041%2fwhy-should-the-rootfs-have-root-ownership%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
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');
);
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');
);
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
What makes you think that the kernel expects this?
â JdeBP
Oct 10 '17 at 5:11
@JdeBP, because if the ownership of the rootfs is different than root, the kernel will fail to mount it.
â Mouin
Oct 10 '17 at 7:04
The vanilla kernel has no such restriction, to my knowledge. So again: What makes you think that the kernel expects this? What error message have you seen, and where?
â JdeBP
Oct 10 '17 at 10:12