Sponsored Content
Full Discussion: getcwd problem.
Top Forums Shell Programming and Scripting getcwd problem. Post 302433292 by methyl on Tuesday 29th of June 2010 07:17:52 AM
Old 06-29-2010
What did you type and what did the system reply?
Please also post a "ls -la" of the directory in question making it clear which user and group you are.


BTW. The type of error usually comes from deleting a directory from one session while is is your current working directory in another session.
It can also be caused by wrong permissions on the directory or directories, dead soft links, automount issues, corruption, very rapid file creation/deletion, etc. etc. .
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

getcwd: permission denied error

When I do a 'cd /appl' and issue 'ls -al' command, I get the following error for .. directory. ./..: Permission denied But still I get a listing of other directories under /appl. Also, if I give 'man' for any command under this /appl folder, I get the following error: ... (3 Replies)
Discussion started by: Deepa
3 Replies

2. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies

3. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

4. Solaris

shell-init: could not get current directory: getcwd: cannot access parent directories

Hello 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... (6 Replies)
Discussion started by: babu.knb
6 Replies

5. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

6. AIX

AIX OS problem? network problem?

Dear ALL. I installed AIX OS on customer sites. but Only one site is too slow when I connected telnet, ftp.. Ping is too fast. but telnet and FTP is not connected.. of course i check the configuration file on aix but it's normal. Do any Idea?? thanks in advance. - Jun - (3 Replies)
Discussion started by: Jeon Jun Seok
3 Replies

7. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

8. UNIX for Advanced & Expert Users

Getcwd

Hi, I constantly get this error as a script is run: getcwd failed (Unix's errno 13; Permission denied) Can anyone point at the location of this function by default in AIX? Thanks! (1 Reply)
Discussion started by: MIA651
1 Replies

9. Solaris

Getcwd performance issues

Hello everyone, recently we have been experiencing performance issues with chmod. We managed to narrow it down to getcwd. The following folder exists: /Folder1/subfol1/subfol2/subfol3 cd /Folder1/subfol1/subfol2/subfol3 truss -D pwd 2>&1 | grep getcwd 0.0001... (4 Replies)
Discussion started by: KotekBury
4 Replies

10. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies
explain_getcwd_or_die(3)				     Library Functions Manual					  explain_getcwd_or_die(3)

NAME
explain_getcwd_or_die - get current working directory and report errors SYNOPSIS
#include <libexplain/getcwd.h> void explain_getcwd_or_die(char *buf, size_t size); DESCRIPTION
The explain_getcwd_or_die function is used to call the getcwd(2) system call. On failure an explanation will be printed to stderr, obtained from explain_getcwd(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_getcwd_or_die(buf, size); buf The buf, exactly as to be passed to the getcwd(2) system call. size The size, exactly as to be passed to the getcwd(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
getcwd(2) Get current working directory explain_getcwd(3) explain getcwd(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_getcwd_or_die(3)
All times are GMT -4. The time now is 04:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy