Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Permission denied even I am root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ranma37
n00b
n00b


Joined: 21 Feb 2003
Posts: 30

PostPosted: Mon Apr 19, 2004 11:06 am    Post subject: Permission denied even I am root Reply with quote

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.
Code:

shutdown -Fr now

My root partition is reiserfs.
Back to top
View user's profile Send private message
mirko_3
l33t
l33t


Joined: 02 Nov 2003
Posts: 605
Location: Birreria

PostPosted: Mon Apr 19, 2004 12:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
MasterX
Veteran
Veteran


Joined: 26 Jun 2003
Posts: 1165

PostPosted: Mon Apr 19, 2004 3:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
ranma37
n00b
n00b


Joined: 21 Feb 2003
Posts: 30

PostPosted: Tue Apr 20, 2004 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
necromncr
n00b
n00b


Joined: 21 Mar 2004
Posts: 44
Location: Ig, Slovenia

PostPosted: Wed Apr 21, 2004 8:38 am    Post subject: Reply with quote

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
View user's profile Send private message
jericospeedy
n00b
n00b


Joined: 23 Apr 2004
Posts: 2

PostPosted: Fri Apr 23, 2004 5:11 pm    Post subject: permission denied during installation Reply with quote

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
View user's profile Send private message
ranma37
n00b
n00b


Joined: 21 Feb 2003
Posts: 30

PostPosted: Mon Apr 26, 2004 2:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Vlad
Apprentice
Apprentice


Joined: 09 Apr 2002
Posts: 264
Location: San Diego, California

PostPosted: Mon Nov 01, 2004 8:32 am    Post subject: Reply with quote

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
View user's profile Send private message
catalYst
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2002
Posts: 119
Location: Appleton, WI USA

PostPosted: Thu Nov 04, 2004 5:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vlad
Apprentice
Apprentice


Joined: 09 Apr 2002
Posts: 264
Location: San Diego, California

PostPosted: Fri Nov 05, 2004 5:14 am    Post subject: Reply with quote

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
View user's profile Send private message
catalYst
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2002
Posts: 119
Location: Appleton, WI USA

PostPosted: Fri Nov 05, 2004 2:58 pm    Post subject: Reply with quote

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 :wink:

-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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum