This content has been marked as final. Show 9 replies
Please show result of commands:
ls -lad /
ls -lad /bin
ls -lad /usr
ls -lad /usr/bin
ls -lad /usr/bin/man
Result should be:
use chmod for set correct permissions.
# ls -lad / drwxr-xr-x 37 root root 1024 Jun 20 17:04 / # ls -lad /bin lrwxrwxrwx 1 root root 9 Aug 17 2009 /bin -> ./usr/bin # ls -lad /usr drwxr-xr-x 39 root sys 1024 Nov 8 2010 /usr # ls -lad /usr/bin drwxr-xr-x 5 root bin 12800 Oct 21 2009 /usr/bin # ls -lad /usr/bin/man -r-xr-xr-x 4 root bin 29568 Apr 7 2002 /usr/bin/man
Other way for restore all permissions:
But you can't control this proces.
oracle> ls -lad /
drwxr-xr-x 26 root root 1024 Aug 11 10:02 /
oracle> ls -lad /bin
lrwxrwxrwx 1 root root 9 Sep 5 2002 /bin -> ./usr/bin
oracle> ls -ladls -lad /usr
2 drwxr-xr-x 32 root sys 1024 Mar 23 2005 /usr
oracle> ls -lad /usr/bin
drwxr-xr-x 4 root bin 9216 May 15 2010 /usr/bin
oracle> ls -lad /usr/bin/man
-r-xr-xr-x 4 root bin 29568 Apr 6 2002 /usr/bin/man
So wht is the next step ? How do I resolve this?
Infirst post you write:
>I logged in as a user 'abc' and when I am trying to execute any executable from /bin/ . I get the permission denied error.
But after you show that for some users it works:
> oracle> ls -lad /usr/bin
So please clarify:
This problem for specific user or for all users ? What shell used for users that have problem ?
This problem for any programs from /bin or for specif set of the program?
.. well, the "ls" command you just used is (normally) in the same directory as the "man" command you described in your first post, so i would suggest that you run the following two commands next:
ls -l /usr/bin/man
Also, does the "permission denied" message return a path? It looks like a bash/sh error, and should in that case say something like:
bash /usr/bin/man: Permission denied
.. in other words, whats the exact error?
oracle> cd /
oracle> man ls
User Commands ls(1)
ls - list contents of directory
/usr/bin/ls [-aAbcCdfFghilLmnopqrRstux1@] [file...]
/usr/xpg4/bin/ls [-aAbcCdfFghilLmnopqrRstux1@] [file...]
For each file that is a directory, ls lists the contents of
the directory. For each file that is an ordinary file, ls
repeats its name and any other information requested. The
output is sorted alphabetically by default. When no argument
is given, the current directory is listed. When several
arguments are given, the arguments are first sorted
appropriately, but file arguments appear before directories
and their contents.
There are three major listing formats. The default format
oracle> echo $HOME
oracle> ls -lad $HOME
drwxr-xr-x 6 oracle dba 1024 Aug 12 02:32 /home/oracle
Thanks guys !!
The problem is solved now ..
Well .. I actually wanted to run the command:
oracle>find /home/oracle/dmps -name '*' -mtime +20;
And I am actually running it from ORACLE Home Dir ..
I suppose it doesn't have enough permissions to access the find file.
Hence, the next thing I did was this:
oracle> cd /
oracle> find /home/oracle/dmps -name '*' -mtime +20;
Now it worked .. :)