2011-05-26 18:19:34

by [email protected]

[permalink] [raw]
Subject: Wrong (0777) permissions on root filesystem after booting the kernel

Hi,

Today I've stated, that in my laptop the root filesystem is mounted with
very dangerous 0777 permissions. I've checked my other machines, and
stated that in total 3 machines behave correctly (0755) and 2
mount / with permissions 0777.

Trying to find the cause, I've stated that it is not associated with
initialization scripts, as booting with "init=/bin/bash" also leads to
situation, where in one machine permissions are set to 0777, while in
the another one, they are set to 0755.

The problem is not associated with the initrd, as it appears also when
booting machine with kernel without initrd.

I've investigated settings of the bootloader (grub), but there is
no visible difference between affected and correctly working machines.

What information is used by the kernel to set permissions when mounting
the root filesystem?
How does it depend on particular machine?
--
TIA & Regards,
Wojtek


2011-05-26 18:37:42

by [email protected]

[permalink] [raw]
Subject: Re: Wrong (0777) permissions on root filesystem after booting the kernel

Hi,

I've forgotten to state, that the problem appears with different kernels
with versions 2.6.33.3 to 2.6.38.2
--
TIA & Regards,
Wojtek

2011-05-26 20:36:47

by [email protected]

[permalink] [raw]
Subject: Re: Wrong (0777) permissions on root filesystem after booting the kernel

OK. The problem is resolved. I've forgotten that permissions of the root
node are stored in the filesystem image.
So now the only problem is to find: how the permissions got changed.
Was it a mistake during system maintenance/upgrade or the system got
somehow compromised :-(.
--
Sorry for confusion,
Wojtek