LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   O.S. Crashed as a result of messing up with / permissions (https://www.linuxquestions.org/questions/linux-newbie-8/o-s-crashed-as-a-result-of-messing-up-with-permissions-4175418342/)

abhishekgit 07-24-2012 01:31 AM

O.S. Crashed as a result of messing up with / permissions
 
Hey everyone,
I am stuck in a serious situation. I use sabayon 8 distribution and i changed the permissions of / like this
Code:

chmod 044 /
, Suddenly bash started rejecting every command, all the windows closed, i was luckily able to restart. I can start sabayon in recovery mode where a terminal is appearing. Any chances of recovery through that command line? Kindly help. Thanks...


Regards...

evo2 07-24-2012 01:57 AM

Hi,

did you try to setting the permissions back? Eg
Code:

chmod 755 /
Evo2.

acid_kewpie 07-24-2012 01:58 AM

as it wasn't recursive, "chmod 755 /" should do the job.

abhishekgit 07-24-2012 01:59 AM

@evo2 In the recovery mode you're talking about? I did. Its getting changed in that recovery mode itself. I am still not able to start the system.

acid_kewpie 07-24-2012 02:02 AM

well where is the filesystem for your main system mounted? /mnt/sysimage or something? chmod that instead.

evo2 07-24-2012 02:04 AM

Hi,
Quote:

Originally Posted by abhishekgit (Post 4736505)
@evo2 In the recovery mode you're talking about? I did. Its getting changed in that recovery mode itself. I am still not able to start the system.

Hmm, not sure "what recovery mode" is. Where any error messages? Can you confirm that the permissions of / really did change from 044 to 755? Eg

Code:

stat /
chmod 755 /
stat /

Evo2.

evo2 07-24-2012 02:05 AM

s/Where/were

abhishekgit 07-24-2012 02:11 AM

Well i have 3 choices in my grub2. The first is sabayon 8, the second sabayon8 recovery mode and the third is win7. In recovery mode i just get a shell prompt. No interface. After i execute chmod 755 /, and the output of ls -l / is rwxr-xr-x, which is fine. After i reboot and start my sabayon, All i get is a blank black screen and it gets stuck there.

abhishekgit 07-24-2012 02:14 AM

@acid kewpie: My primary o.s. was win7. I dual booted. I am not sure about the file system where i've mounted.

evo2 07-24-2012 02:15 AM

Hi,

Quote:

Originally Posted by abhishekgit (Post 4736516)
Well i have 3 choices in my grub2. The first is sabayon 8, the second sabayon8 recovery mode and the third is win7. In recovery mode i just get a shell prompt.

Ok.
Quote:

After i execute chmod 755 /, and the output of ls -l / is rwxr-xr-x, which is fine.
Yes but what about before running "chmod 755 /" Can you confirm that it is really 044? If it is not then you are probably trying to chmod the wrong parition. Ie "/" in "recovery mode" is not your normal "/". In this case you need to mount your normal "/" somewhere and run chmod on it (this is what acid_kewpie is talking about).

Evo2.

abhishekgit 07-24-2012 02:20 AM

Quote:

Ie "/" in "recovery mode" is not your normal "/"
I got it! But I do not have access to my normal "/" through recovery mode. How do i get to know the mounted filesystem through recovery. That would probably solve the problem.

acid_kewpie 07-24-2012 02:26 AM

well if you run "mount" you may well see it somewhere else, like where I mentioned. Otherwise you can mount it yourself.

abhishekgit 07-24-2012 02:31 AM

@acid kewpie : Do you mean I have to chmod the output of mount command through recovery shell prompt?

evo2 07-24-2012 02:32 AM

Hi,

if you just have the one physical disk it will be /dev/sdaN where N is some >0 integer.
Try the following.

Code:

mount -t ext3 /dev/sda1 /mnt
ls /mnt

If it looks like your "/"
do
Code:

chmod 755 /mnt
umount /mnt

and reboot the system.

If it doesn't look like your /, umount it and try the next partition.

Evo2.

PS. There is probably some command to list all the unmounted partitions, but it escapes me right now.

abhishekgit 07-24-2012 03:04 AM

@evo2:
I tried it and this is what i got
Quote:

mount: Wrong fs type, bad option, bad superblock on /dev/sda1 missing codepage or helper program or other error. In some cases useful info is found in syslog. Try dmesg | tail.
And i tried
Quote:

dmesg tail
this is the output

Quote:

EXT3-fs :error: can't find ext3 filesystem on /dev/sda1
EXT3-fs :error: can't find ext3 filesystem on /dev/sda2


All times are GMT -5. The time now is 04:33 AM.