LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-27-2006, 02:14 PM   #1
Dauron
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
/ access problem


Hello!

I have been writing a small script today and I've made a small mistake, that resulted in calling following command:
chmod 644 /
and now I have a big problem... I cannot run anything on my hdd...
I have rebooted from the liveCD and wanted to do chroot, to investigate what had happened, but the following error appears:
chroot: cannot execute /bin/sh: Permission denied

Is there any way to change access rights to the main node of a disk, when it is not mounted as /? or will I have to do format+reinstall? :/

Regards,
Dauron
 
Old 11-27-2006, 02:40 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Try booting with a Live CD, create a mount point (mkdir /omg), mount your partition there (mount /dev/hdx /omg) and then correct the permissions (chmod 755 /omg).
Substitute /dev/hdx with your root partition.

Then try the chroot thing. If it works, try booting as usual.
 
Old 11-27-2006, 02:57 PM   #3
Dauron
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Original Poster
Rep: Reputation: 0
/ access problem / access problem

I've already tried it, it doesn't work
When I mount the partition, all the rights look ok... maybe it is sth. other than the rights of /... but what else can give these 'no permissions'
 
Old 11-27-2006, 08:49 PM   #4
burninGpi
Member
 
Registered: Mar 2006
Location: Fort McMurray, Canada
Distribution: Gentoo ~amd64
Posts: 163

Rep: Reputation: 30
do what uselpa said, only do chmod 755 /omg/bin/*
 
Old 11-28-2006, 02:22 AM   #5
Dauron
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Original Poster
Rep: Reputation: 0
As I said, all the rights in the directories, subdirectories and files are ok (at least when the partition is mounted as the subdirectory of /). The problem appears when it is being mounted as /
 
Old 11-28-2006, 02:55 AM   #6
Dauron
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Solved!
chmod 755 /omg/lib/*
I'm so happy, that I don't have to reinstall the system
 
Old 11-28-2006, 08:03 AM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Without wishing to sound like a smartarse, this is one of those things which justify the advice "don't use root unless you absolutely have to!" Of course, it may have been unavoidable in this case.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
internet access problem superraylo Linux - Networking 4 06-04-2006 10:41 PM
scsi access problem panhaiy1375 Programming 0 01-10-2006 03:35 AM
Internet and LAN access is unstable-is this a hardware problem or a software problem? soren625 Linux - Networking 1 06-07-2004 06:43 AM
Ftp access problem hasitha Linux - Networking 3 01-13-2004 08:08 PM
Access Problem prashu_bvp Linux - Networking 0 03-05-2003 01:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:20 AM.

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