View previous topic :: View next topic |
Author |
Message |
ranma37 n00b
Joined: 21 Feb 2003 Posts: 30
|
Posted: Mon Apr 19, 2004 11:06 am Post subject: Permission denied even I am root |
|
|
Code: |
# whoami
root
# ls -l /etc/hotplug/scsi.agent
ls: /etc/hotplug/scsi.agent: Permission denied
|
Is my harddisk corrupted?
I did fsck and couldn't find any problem.
My root partition is reiserfs. |
|
Back to top |
|
|
mirko_3 l33t
Joined: 02 Nov 2003 Posts: 605 Location: Birreria
|
Posted: Mon Apr 19, 2004 12:11 pm Post subject: |
|
|
Happened a few times to me as well, with reiserfs, after a bad reboot.. a couple clean reboots usually fixed it. _________________ Non fa male! Non fa male! |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Mon Apr 19, 2004 3:08 pm Post subject: |
|
|
If you do ls -l /etc/hotplug what do you see for scsi.agent? What is the group/owner of this file?
BTW, fsck would not find/fix problems, you need to run fsck -c. |
|
Back to top |
|
|
ranma37 n00b
Joined: 21 Feb 2003 Posts: 30
|
Posted: Tue Apr 20, 2004 12:25 pm Post subject: |
|
|
I use "shutdown -Fr now" to force full fsck after reboot.
I guess the "checkroot" script will do "fsck -c" for you.
I don't know how to check root partition when it is already mounted rw.
Code: |
# ls -l /etc/hotplug
ls: /etc/hotplug/scsi.agent: Permission denied
ls: /etc/hotplug/firmware.agent: Permission denied
total 145
-rw-r--r-- 1 root root 640 Feb 19 17:25 blacklist
-rwxr-xr-x 1 root root 6369 Feb 19 17:25 dasd.agent*
-rwxr-xr-x 1 root root 685 Apr 19 18:00 dasd.permissions*
-rw-r--r-- 1 root root 5253 Feb 19 17:25 hotplug.functions
-rwxr-xr-x 1 root root 2873 Apr 19 18:00 ieee1394.agent*
-rwxr-xr-x 1 root root 6830 Feb 19 17:25 input.agent*
-rwxr-xr-x 1 root root 3148 Feb 19 17:25 input.rc*
-rwxr-xr-x 1 root root 1764 Feb 19 17:25 net.agent*
drwxr-xr-x 2 root root 48 Dec 21 21:18 pci/
-rwxr-xr-x 1 root root 3746 Apr 19 18:00 pci.agent*
-rwxr-xr-x 1 root root 2117 Feb 19 17:25 pci.rc*
-rwxr-xr-x 1 root root 6967 Apr 19 18:00 tape.agent*
drwxr-xr-x 2 root root 184 Feb 9 01:35 usb/
-rwxr-xr-x 1 root root 13442 Feb 19 17:25 usb.agent*
-rw-r--r-- 1 root root 38952 Feb 19 17:25 usb.distmap
-rw-r--r-- 1 root root 4364 Feb 19 17:25 usb.handmap
-rwxr-xr-x 1 root root 12343 Feb 19 17:25 usb.rc*
-rw-r--r-- 1 root root 189 Apr 19 18:00 usb.usermap
|
As you can see, I can't even know the group/owner of these problem files.
|
|
Back to top |
|
|
necromncr n00b
Joined: 21 Mar 2004 Posts: 44 Location: Ig, Slovenia
|
Posted: Wed Apr 21, 2004 8:38 am Post subject: |
|
|
I might be off-sync with your problem, but permission denied error occurs when file is supposed to be somewhere but aint there. Like network mounted drive yet no longer there.
*wacko talk ahead*
I dont know anything about hotpluging, but maybe it creates those files when needed, yet due to an error, they're not there. |
|
Back to top |
|
|
jericospeedy n00b
Joined: 23 Apr 2004 Posts: 2
|
Posted: Fri Apr 23, 2004 5:11 pm Post subject: permission denied during installation |
|
|
I encountered this problem during installation. The only think I can think of is I executed shhd after setting up my network so someone could help me with the installation. The funny thing is that the person helping me out, and accessing my computer through sshd, could execute the commands for which I was receiving "Permission denied" - i had no permission, but someone logged onto my computer did?? Strange... I was definitely root, and the files and directories definitely existed because the other person was able to execute the commands. Anyway, my friend edited my file permission settings, noticed root was setup for 'viewing only', so he changed it to reinstate my permissions. Not too difficult of a solution, but how the hell did it happen in the first place? I am also using reiserfs, and the problem was not corrected by rebooting. |
|
Back to top |
|
|
ranma37 n00b
Joined: 21 Feb 2003 Posts: 30
|
Posted: Mon Apr 26, 2004 2:09 am Post subject: |
|
|
Ok. I figured out doing "shutdown -Fr" won't really fsck my root partition.
I have to boot from a Gentoo 1.4 CD, then run Code: | reiserfsck /dev/hdax |
The real problem is that there are some bad sectors in my HD. I'll buy a new one this week. Thanks you all for posting replys. |
|
Back to top |
|
|
Vlad Apprentice
Joined: 09 Apr 2002 Posts: 264 Location: San Diego, California
|
Posted: Mon Nov 01, 2004 8:32 am Post subject: |
|
|
Excuse the bump. Just thought I'd update this post to include another solution, incase anyone has the same problem:
Using reiserfs on a 2.6.9 kernel. Had a bad reboot followed by disk corruption. The following repaired the tree - I also had huge amounts of missing space on my disk.
Code: |
# fsck.reiserfs --rebuild-tree /dev/hdxy
|
Normal ReiserFS fsck didn't catch the problem. *Had* to include the --rebuild-tree. |
|
Back to top |
|
|
catalYst Tux's lil' helper
Joined: 02 May 2002 Posts: 119 Location: Appleton, WI USA
|
Posted: Thu Nov 04, 2004 5:34 pm Post subject: |
|
|
But does --rebuild-tree fsck with the data in any way? I am nervous about running it on my root drive, but I too have a dangling file that root isn't allowed to touch. |
|
Back to top |
|
|
Vlad Apprentice
Joined: 09 Apr 2002 Posts: 264 Location: San Diego, California
|
Posted: Fri Nov 05, 2004 5:14 am Post subject: |
|
|
I didn't have any problems (my /usr partition was corrupted). After fscking, all items that were broken were moved to /usr/lost+found.
This happened when I was compiling a kernel, so most of the lost+found entries were actually ELF objects. You really only have one solution to fix the problem, and that's --rebuild-tree. I wouldn't worry about the rest of your data, and if the rebuild appears to hang on the file that's undeletable - don't worry, just give it time.
Of course you should always have a recent backup, yadda yadda yadda. You can always quickly burn some (all?) of your / partition to a DVD (CD?). |
|
Back to top |
|
|
catalYst Tux's lil' helper
Joined: 02 May 2002 Posts: 119 Location: Appleton, WI USA
|
Posted: Fri Nov 05, 2004 2:58 pm Post subject: |
|
|
Thanks for the info Vlad. Thankfully I had one of those hell-bound IBM drives before I updgraded to 200g, so I learned my lesson and now keep an rsync backup of all my systems. I just wondered if I'd have to spend the day reinstalling Gentoo or not
-colin
(EDIT: the backups are only of data, not the whole system . . . thus the reinstall. Maybe if I got another 200g I could just mirror the whole system . . . ) |
|
Back to top |
|
|
|