The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 10-03-2008
ikorolev ikorolev is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 40
Quote:
Originally Posted by babu.knb View Post
Hello

Code:
 
root@ne-ocadev-1:/root/scripts>su espos -c find /ESPOS/oracle/arc -type f -atime +10 -exec ls {};
shell-init: could not get current directory: getcwd: cannot access parent directories: Permission denied
Please help for this issue.

Mmmmm, may be you cannot access parent directories by user espos ?
Likely you have not rigth to read or exec on this dir.check it:
pwd
ls -la

if it looks like this
drwx------
you can't read this directory by another user (only root or master of dir)
When you write 'su espos' you will get only effective id of user espos, you stay in directory where you are (but user espos cannot read in this dir)

I guess you need test this
su - espos -c 'find /ESPOS/oracle/arc -type f -atime +10 -exec ls {} \;'


su 'dash' user