Quote:
Originally Posted by babu.knb
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