LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2012, 02:31 AM   #1
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165

Rep: Reputation: 12
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...
 
Old 07-24-2012, 02:57 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

did you try to setting the permissions back? Eg
Code:
chmod 755 /
Evo2.
 
Old 07-24-2012, 02:58 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
as it wasn't recursive, "chmod 755 /" should do the job.
 
Old 07-24-2012, 02:59 AM   #4
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165

Original Poster
Rep: Reputation: 12
@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.
 
Old 07-24-2012, 03:02 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well where is the filesystem for your main system mounted? /mnt/sysimage or something? chmod that instead.
 
Old 07-24-2012, 03:04 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by abhishekgit View Post
@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.
 
Old 07-24-2012, 03:05 AM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
s/Where/were
 
Old 07-24-2012, 03:11 AM   #8
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165

Original Poster
Rep: Reputation: 12
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.
 
Old 07-24-2012, 03:14 AM   #9
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165

Original Poster
Rep: Reputation: 12
@acid kewpie: My primary o.s. was win7. I dual booted. I am not sure about the file system where i've mounted.
 
Old 07-24-2012, 03:15 AM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

Quote:
Originally Posted by abhishekgit View Post
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.
 
Old 07-24-2012, 03:20 AM   #11
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165

Original Poster
Rep: Reputation: 12
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.
 
Old 07-24-2012, 03:26 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well if you run "mount" you may well see it somewhere else, like where I mentioned. Otherwise you can mount it yourself.
 
Old 07-24-2012, 03:31 AM   #13
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165

Original Poster
Rep: Reputation: 12
@acid kewpie : Do you mean I have to chmod the output of mount command through recovery shell prompt?
 
Old 07-24-2012, 03:32 AM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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.
 
Old 07-24-2012, 04:04 AM   #15
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165

Original Poster
Rep: Reputation: 12
@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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Messing about with permissions, won't turn on. callumacrae Linux - General 28 10-29-2009 07:53 AM
Who's messing about with my bashrc? tortle Linux - Newbie 4 01-18-2005 10:57 AM
smbmount is messing with mount point permissions Sohni Linux - Networking 1 04-06-2004 11:37 AM
X is messing with me, or something is... Starchild Linux - General 2 09-27-2003 03:44 PM
RH keeps messing up...:( floyes Red Hat 4 09-06-2003 03:36 PM


All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration