LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-16-2006, 10:33 PM   #1
dllahr
LQ Newbie
 
Registered: Nov 2004
Distribution: FC 3
Posts: 12

Rep: Reputation: 0
root denied access to a directory


Hello

I'm logged in as root on a redhat 9, and there are certain directorys which it says I don't have permission to view. I didn't think this was possible as root. Also, there are certain files on the system which (as root) I can't change the permissions of. I'm stumped as to how to even start diagnosing the problem. Thanks in advance for any help.

Dave
 
Old 08-16-2006, 11:28 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Can you give examples of these files?
 
Old 08-17-2006, 02:02 AM   #3
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
Ok - just login as root.
open a xterm and use the command "ll" to show the files including their permissons and owners. (same as ls -a) but for this case more suitable.
the you need "chown" to change the owner of that file.
With chmod you can change the the behavior of a file and chown changes the owner.

chown [ -f ] [ -h ] [ -R ] Owner [ :Group ] { File ... | Directory
 
Old 08-17-2006, 02:46 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by dllahr
Hello

I'm logged in as root on a redhat 9, and there are certain directorys which it says I don't have permission to view. I didn't think this was possible as root. Also, there are certain files on the system which (as root) I can't change the permissions of. I'm stumped as to how to even start diagnosing the problem. Thanks in advance for any help.

Dave
Things like that CAN happen when a filesystem gets its knickers
in a twist. Try to run an fsck on the partition with the issue.

Or maybe SELinux? Not that I'm an expert, mind you, I don't use
it myself - too much hassle; so I don't know whether or how it affects
roots access to the system.


Cheers,
Tink
 
Old 08-17-2006, 06:08 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
I agree with Tinkster that it could very well be a filesystem problem.
dllahr, could you please post the contents of /etc/fstab as well please?
 
Old 08-17-2006, 08:24 AM   #6
dllahr
LQ Newbie
 
Registered: Nov 2004
Distribution: FC 3
Posts: 12

Original Poster
Rep: Reputation: 0
root denied access to a directory

Hello

Thanks everyone for responding. The files are programs (for computational chemistry) located in /usr/local/bin
Here is an example of the ls and/or ll output from a directory I don't have access to

ls -ld pentium_linux
drwxr-xr-- 4 root root 4096 Oct 30 2004 pentium_linux/

ls -l pentium_linux
ls: pentium_linux/Makeflags: Permission denied
ls: pentium_linux/README.das: Permission denied
ls: pentium_linux/libband.a: Permission denied
ls: pentium_linux/libnmr.a: Permission denied
ls: pentium_linux/libadf.a: Permission denied
ls: pentium_linux/settings: Permission denied
ls: pentium_linux/das: Permission denied
ls: pentium_linux/bin.pvm: Permission denied
ls: pentium_linux/libtc.a: Permission denied
total 0

ll -d pentium_linux
drwxr-xr-- 4 root root 4096 Oct 30 2004 pentium_linux/


I tried chown root:root pentium_linux
There was no complaint/output, but it didn't change the behaviour.

here is the /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/scratch /scratch ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
highlife:/usr/local /usr/local nfs


I will run fsck soon, I think I need to get in front of the computer and use a boot/rescue CD so that I can have the /usr partition umounted.

Thanks again!

Dave
 
Old 08-17-2006, 08:53 AM   #7
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Quote:
highlife:/usr/local /usr/local nfs
It seems to me that /usr/local, and thus also /usr/local/bin and whatever's inside those directories, comes from a mounted NFS partition.
Your machine's 'root' user may not have 'root' privileges on the remote machine.
When altering a directory/file permission on this NFS partition, you need to have sufficient privileges on the remote machine.

I'm no NFS expert, but maybe you can play around a little with the mount options? Or try accessing the remote machine (it seems to be called 'highlife') and try changing the NFS export options on that machine.
 
Old 08-17-2006, 10:09 AM   #8
dllahr
LQ Newbie
 
Registered: Nov 2004
Distribution: FC 3
Posts: 12

Original Poster
Rep: Reputation: 0
Good point. I've checked on the computer "highlife", and I have the same problem with the /usr/local/bin files as I had orignally. So I guess it's not NFS. So I think I need to run fsck on /usr on "highlife".
 
  


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
Root - Access Denied ! centroid Red Hat 1 05-08-2006 08:16 AM
root gets 'Permission denied' to directory mikemrh9 Linux - Security 2 11-18-2005 04:15 AM
root denied access? Xstack Linux - Security 10 12-12-2004 05:52 AM
Directory access denied to root user: inode hack? netmar Linux - Security 2 07-31-2004 04:53 AM
Access denied to 'Home' directory aviceda Linux - Newbie 2 11-07-2003 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:37 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
Open Source Consulting | Domain Registration