Sponsored Content
Top Forums UNIX for Advanced & Expert Users getcwd: permission denied error Post 34225 by Perderabo on Monday 10th of February 2003 08:16:55 AM
Old 02-10-2003
I've seen stuff like this before on SunOS and I believe that it is a bug in the SunOS kernel. The problem is that the permissions on the mountpoint are wrong. After a mount, this should not matter, but with SunOS it does.

To make the problem go away, you need to do:

umount /appl
chmod 755 /appl
mount /appl
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

rm Permission Denied error

I am very new to Unix. We have a script that will remove files from a directory. The account removing the files has the same permissions as the directory the files are located. We have logged in as the account and deleted the files from that directory but when we run the script with the account... (7 Replies)
Discussion started by: Cech2002
7 Replies

2. Shell Programming and Scripting

xterm gives me permission denied error

When I try to run xterm at a command prompt in solaris 2.5.1, i'm getting a permission denied error. But the directory and user permissions look ok, they are part of a users group and then also root,sys,adm so what gives? Any ideas? Thanks! (1 Reply)
Discussion started by: kymberm
1 Replies

3. UNIX for Advanced & Expert Users

Need help with Couldn't canonicalise: Permission denied error

Hi People I am getting this error Couldn't canonicalise: Permission denied. Anyone knows what does this error mean ? It all started when my team members were testing Sftp functions on some directories and they were hitting directory no found errors within their scripts. So when we enquired... (8 Replies)
Discussion started by: wilsontan
8 Replies

4. OS X (Apple)

Permission Denied Error with X11

Hello, I am using Tiger 10.4.11 I am trying out the GIMP, so I installed the X11 package from "Optional Installs" on the cd. Whenever I open X11, I get an error: xterm: could not exec /dev/null: Permission denied I have chmodded /dev/null to 777, as well as the /tmp directory. I deleted... (2 Replies)
Discussion started by: Ricardo-san
2 Replies

5. Shell Programming and Scripting

Change: xecho: execute permission denied error

Hello, I am have an issues with one of my scripts. I get the following error when I get to the point in the script where I am making the change. The change does take however. the error is "change: xecho: execute permission denied" Everything was working properly until I start cleaning... (3 Replies)
Discussion started by: simpsonjr
3 Replies

6. UNIX for Dummies Questions & Answers

Getting Error 0403-006 Execute permission denied.

Hi All, Need your help.. I am writing one script in which I am assigning value to one variable but when i am executing it is showing error "0403-006 Execute permission denied" below is the line of that script : INPUT_COUNT=wc $GIF_DIR/input/VID_RIMS.DAT | awk '{print $1}' and access... (2 Replies)
Discussion started by: NirajThakar
2 Replies

7. AIX

SSH Error - Permission denied (publickey,keyboard-interactive)

Hello, I'm trying to setup password less authentication to remote ssh server. I generated the public key and gave it to the vendor and The key is added in the remote machines authorized_keys file. When I try to connect to a remote machine through SFTP username@host I am getting the error... (4 Replies)
Discussion started by: nice_chapp
4 Replies

8. UNIX for Dummies Questions & Answers

Webserver permission denied error

Hello, I was trying a perl-cgi tutorial and saving the data from online form to a file named (guests.txt). I am using the localhost port 80 for practice. My page file "guestbook.html" is working as I saw the online form. After filled out the blanks and submit, I was expecting to see the result... (3 Replies)
Discussion started by: yifangt
3 Replies

9. Red Hat

Permission denied error using chmod on a cifs mount

I have a RHEL 5.7 system with a cifs mount from a Windows 2007 file server that I need to fix the permissions on. Once the share is mounted the permission for the mount are 777. I need to change that to 770 on the top level directory and to 640 on the sub-directory .ssh/. But when I run chmod... (0 Replies)
Discussion started by: westmoreland
0 Replies

10. Shell Programming and Scripting

Pipe, permission denied error

Hello, I am trying to stream lines written into file. When first source is down, I expect the code to swap to second line and run it. Script below works as usual and it prints out each line of the input file (s.txt): #!/bin/bash while read -r line; do echo "$line" done <"$1" exit 0Output... (12 Replies)
Discussion started by: baris35
12 Replies
GETCWD(3)						   BSD Library Functions Manual 						 GETCWD(3)

NAME
getcwd, getwd -- get working directory pathname LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> char * getcwd(char *buf, size_t size); char * getwd(char *buf); DESCRIPTION
The getcwd() function copies the absolute pathname of the current working directory into the memory referenced by buf and returns a pointer to buf. The size argument is the size, in bytes, of the array referenced by buf. If buf is NULL, space is allocated as necessary to store the pathname. This space may later be free(3)'d. The function getwd() is a compatibility routine which calls getcwd() with its buf argument and a size of MAXPATHLEN (as defined in the include file <sys/param.h>). Obviously, buf should be at least MAXPATHLEN bytes in length. These routines have traditionally been used by programs to save the name of a working directory for the purpose of returning to it. A much faster and less error-prone method of accomplishing this is to open the current directory ('.') and use the fchdir(2) function to return. RETURN VALUES
Upon successful completion, a pointer to the pathname is returned. Otherwise a NULL pointer is returned and the global variable errno is set to indicate the error. In addition, getwd() copies the error message associated with errno into the memory referenced by buf. ERRORS
The getcwd() function will fail if: [EACCES] Read or search permission was denied for a component of the pathname. [EINVAL] The size argument is zero. [ENOENT] A component of the pathname no longer exists. [ENOMEM] Insufficient memory is available. [ERANGE] The size argument is greater than zero but smaller than the length of the pathname plus 1. SEE ALSO
chdir(2), fchdir(2), malloc(3), strerror(3) STANDARDS
The getcwd() function conforms to ISO/IEC 9945-1:1990 (``POSIX.1''). The ability to specify a NULL pointer and have getcwd() allocate memory as necessary is an extension. HISTORY
The getwd() function appeared in 4.0BSD. BUGS
The getwd() function does not do sufficient error checking and is not able to return very long, but valid, paths. It is provided for compat- ibility. BSD
November 24, 1997 BSD
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy