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



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
parent shell is waiting upon the child shell ruchirmayank Shell Programming and Scripting 0 05-06-2008 04:08 AM
restrict access of a user to two directories only vikas027 Red Hat 10 05-03-2008 10:26 AM
searching content of files in the current and sub directories tiger99 Shell Programming and Scripting 4 01-23-2008 03:11 AM
Access permisions issue for directories bishnu.bhatta UNIX for Advanced & Expert Users 1 05-16-2007 09:24 PM
Listing only directories in the current working directory using the "ls" command igandu UNIX for Dummies Questions & Answers 2 05-12-2006 04:47 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-03-2008
babu.knb babu.knb is offline
Registered User
  
 

Join Date: Sep 2008
Location: India
Posts: 7
shell-init: could not get current directory: getcwd: cannot access parent directories

Hello

Code:
 
 
root@ne-ocadev-1:/root/scripts>su espos -c find /a35vol100/ESPOS/oracle/db/9.2.0/oradata/ESPOS/archive -type f -atime +10 -exec ls {}
 
shell-init: could not get current directory: getcwd: cannot access parent directories: Permission denied
 
find: insufficient number of arguments
find: path-list predicate-list
 
root@ne-ocadev-1:/root/scripts>su espos -c find /a35vol100/ESPOS/oracle/arc -type f -atime +10 -exec ls {}
 
shell-init: could not get current directory: getcwd: cannot access parent directories: Permission denied
find: insufficient number of arguments
find: path-list predicate-list
 
root@ne-ocadev-1:/root/scripts>id
uid=0(root) gid=1(other)
 
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
find: insufficient number of arguments
find: path-list predicate-list
 
root@ne-ocadev-1:/root/scripts>id
uid=0(root) gid=1(other)
 
root@ne-ocadev-1:/root/scripts>su - espos
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
You have new mail.
 
ne-ocadev-1(on ) DB:ESPOS User:espos
/ESPOS/oracle/db/9.2.0> cd ..
ne-ocadev-1(on ) DB:ESPOS User:espos
/ESPOS/oracle/db> cd ..
ne-ocadev-1(on ) DB:ESPOS User:espos
/ESPOS/oracle> cd arc/
ne-ocadev-1(on ) DB:ESPOS User:espos
 
/ESPOS/oracle/arc> ls -lrt | wc -l
885
 
ne-ocadev-1(on ) DB:ESPOS User:espos
/ESPOS/oracle/arc> pwd
/ESPOS/oracle/arc
ne-ocadev-1(on ) DB:ESPOS User:espos
/ESPOS/oracle/arc> su - root
Password:
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
 
root@ne-ocadev-1:/root>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
find: insufficient number of arguments
find: path-list predicate-list
Please help for this issue.
  #2 (permalink)  
Old 10-03-2008
incredible incredible is offline Forum Advisor  
Registered User
  
 

Join Date: May 2008
Location: s'pore
Posts: 2,024
Is this an intermittent problem?
  #3 (permalink)  
Old 10-03-2008
babu.knb babu.knb is offline
Registered User
  
 

Join Date: Sep 2008
Location: India
Posts: 7
Thanks for your support.

I'm not sure thsis intermittent problem.

but if i connect 'Espos' user i can able to read all file but throw root user i can't do any thing.

I need to give any permission?

Babu
  #4 (permalink)  
Old 10-03-2008
incredible incredible is offline Forum Advisor  
Registered User
  
 

Join Date: May 2008
Location: s'pore
Posts: 2,024
What are the special priviledges for the Epos user under the profile? What shell is it using by default? By right, root should be able to do anything, but in your circumstances, I would rather take thru the step by step troubleshooting step to see "what root is missing" ..
  #5 (permalink)  
Old 10-03-2008
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,265
Is /root/scripts NFS mounted ?
  #6 (permalink)  
Old 10-03-2008
pupp's Avatar
pupp pupp is offline Forum Staff  
cap_10hdx 1
  
 

Join Date: Feb 2008
Location: Jersey Shore
Posts: 542
looking at the command... shouldn't you fail to complete the command? you need `.... -exec ls {} \;` or `... -exec ls {} +`
  #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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 01:26 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0