Sponsored Content
Full Discussion: rm Permission Denied error
Top Forums UNIX for Dummies Questions & Answers rm Permission Denied error Post 23115 by Cech2002 on Monday 17th of June 2002 12:23:24 PM
Old 06-17-2002
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 it comes up with permissions denied.

This is what they have in the script to remove files.
eval find $LOG_DIR -mtime +$LOG_DAYS -name \'$LOG_FILE\' -exec rm {} \\\;

Any ideas? I do not know where to look next.Smilie
 

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. 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. Shell Programming and Scripting

ERROR : Permission denied (publickey,password,keyboard-interactive).

Hello, when I try to connect to a remote machine through SSH username@host I am getting the error message Permission denied (publickey,password,keyboard-interactive). Can any one tell me what is the problem. the key is added in the remote machines authorized_keys file. (5 Replies)
Discussion started by: deepusunil
5 Replies

5. 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

6. 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

7. 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

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
access(2)							System Calls Manual							 access(2)

NAME
access - Determines the accessibility of a file SYNOPSIS
#include <unistd.h> int access ( const char *path, int access_mode) ; STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: access(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to the file pathname. When the path parameter refers to a symbolic link, the access() function returns information about the file pointed to by the symbolic link. Permission to access all components of the path parameter is determined by using a real user ID instead of an effective user ID, and a group access list (including a real group ID) instead of an effective group ID. Specifies the type of access. The bit pattern contained in the access_mode parameter is constructed by a logical OR of the following values: Checks read permission. Checks write permission. Checks execute (search) permission. Checks to see if the file exists. DESCRIPTION
The access() function checks for accessibility of the file specified by a pathname. Only access bits are checked. A directory may be indicated as writable by access(), but an attempt to open it for writing will fail (although files may be created there); a file's access bits may indicate that it is executable, but the execve() function can fail if the file does not contain the proper format. RETURN VALUES
Upon successful completion, the access() function returns value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If the access() function fails, access to the file specified by the path parameter is denied and errno may be set to one of the following values: Permission bits of the file mode do not permit the requested access, or search permission is denied on a component of the path pre- fix. The owner of a file has permission checked with respect to the ``owner'' read, write, and execute mode bits, members of the file's group other than the owner have permission checked with respect to the ``group'' mode bits, and all others have permissions checked with respect to the ``other'' mode bits. The path parameter points outside the process' allocated address space. The pathname contains a char- acter with the high-order bit set. An I/O error occurred while reading from or writing to the file system. Too many symbolic links were encountered in translating the pathname. A component of a pathname exceeded PATH_MAX characters, or an entire pathname exceeded NAME_MAX characters. The named file does not exist or is an empty string. A component of the path prefix is not a directory. Write access is requested for a file on a read-only file system. RELATED INFORMATION
Functions: chmod(2), stat(2) Standards: standards(5) delim off access(2)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy