Permission denied on " ls "for root user
Dear,
i am getting permission denied for some files within my home directory using "ls" command. Even, when the root(super-user) login is used for the same listing , i am getting a permission denied error message. can anybody help me in explaining/tracing the above message. as per my knowledge, the super-user can list all the files in any directory. early response will be appreciated.. Regards Vivek J. |
Instead of su, try "su -" this seems to work better for me. Thansk
|
does "su - " affect listing of files for super-user.
|
I believe that su give you super user privleges and su - makes you the user root. Clear as mud?
|
try this (w/o quotes): "strace ls <options> <dir or file>" and post the output here.
|
Quote:
PLEASE READ man su !!! |
Reread the man page.
Code:
su [username] of that username. No username => switch user to root (uid 0, really) Code:
su - [username] because if you are "frodo" and you "su bilbo", you keep frodo's environment, which means if bilbo has a different path from frodo, you won't get what you expect for bilbo. However, if you use "su - bilbo", you will get the environment of bilbo. It doesn't matter that much for this question, since Code:
su How is the home disk/partition mounted? If it's mounted via NFS, root most likely WON'T have permission to read the files, since that permission is set by the server. If the disk is local but mounted in a funky way, you could cause all files, but not just certain files to be unreadable. |
anyway, If you don't use su - you wont be able to run a lot of command (since you don't have the env you dont have the path)
|
Output of strace command
here is an output of strace command :
orbit@avior:~/data> strace ls -l secrvr.log |
Do you have read and execute privelleges to the directory in which you're trying to look in?
|
have you red the man pages of strace and ls???
|
I "red" the man pages and it blue...sorry I could not resist :D
|
oooooooooops, didn't see that.
Quote:
|
All times are GMT -5. The time now is 10:04 AM. |