02-03-2012
Unable to delete directory even with 777 perm
Hi,
I have an 'empty' directory 'tmp' of which I am the owner and 777 permission. But when I try to delete the directory using rmdir or rm command, it gives error.
Command prompt snapshot:
=> uname
SunOS
ashl6@/apps/abinitio/data/serial/landing_zone/ent/adw/policy_cmcl/backup/15_07_2011
=> ls -l
total 3
drwxrwxrwx 2 ashl6 etl 2 Feb 3 19:05 tmp
ashl6@/apps/abinitio/data/serial/landing_zone/ent/adw/policy_cmcl/backup/15_07_2011
=> \rm -rf tmp
rm: Unable to remove directory tmp: Permission denied
What could be other permission needed to remove the 'tmp' directory?
Could you it have anything to do with permission/owner etc of parent directory 15_07_2011? Should it matter?
Thanks for your help in advance!
Last edited by platinum81; 02-03-2012 at 09:43 PM..
Reason: Added more details
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi ..
I am trying to deleta a file but i cant do the error i get is
rm: hs_pdref_custom_dict_PG1_out_76_out non-existent
but when i do ls it is listing the in the directory ...
please find the filed below....
-rw-r----- 1 tsta107 users 118011030 Dec 1 04:07... (13 Replies)
Discussion started by: arunkumar_mca
13 Replies
2. UNIX for Advanced & Expert Users
Version-Release number of selected component (if applicable):
==================================================================
root@server # cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
root@server # uname -a
Linux server.integrityserver.net... (16 Replies)
Discussion started by: fed.linuxgossip
16 Replies
3. UNIX for Dummies Questions & Answers
I have more than 1 million files (No directories). rm -rf * did not work.
How do i delete all these files at a stretch in a single command? (9 Replies)
Discussion started by: sydney2008
9 Replies
4. Solaris
Morning all, I was running some deployment scripts on Friday night that kept failing because it prompted for a password for a user I was already sudo'd in as when trying to scp a file onto itself.
e.g.
on server 51.123.123.123 as sudo dlam
typing: scp testfile dlam@51.123.123.123:/tmp ... (5 Replies)
Discussion started by: dlam
5 Replies
5. Cybersecurity
User usrA creates dirA directory and runs chmod 777 on the directory. Can usrB issue another 777 on dirA? It appears the answer is no even if the usrA and usrB are part of the same group. I know this is a rare scenario but I just ran across it and found out that usrB receives an error when... (4 Replies)
Discussion started by: zlek131
4 Replies
6. Solaris
Hi All,
I am trying to uninstall jdk 1.5 from my Solaris 10 64 bit but some how was not successful.so tried to delete the folder of jdk from /usr but its throughing error as:
Unable to remove directory jdk: Read-only file system
Even I tried to create a dir in /usr but its not allowing me... (4 Replies)
Discussion started by: Pshah
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
My apologies if my query is already available on this forum but I am new and could not find.
I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this?
... (4 Replies)
Discussion started by: 8709711
4 Replies
8. UNIX for Dummies Questions & Answers
I finally installed Chakra Linux and noticed whether I create or extract a file with 700, 755, 775 permissions a * sign is listed at the end of the filename:
$ ls -l bin/32
total 16440
-rwxr-xr-x 1 501 utmp 6321496 09.12.2013 04:02 bitcoind*
-rwxr-xr-x 1 501 utmp 10508613 09.12.2013 04:02... (10 Replies)
Discussion started by: Azrael
10 Replies
9. AIX
heapdump716960.1416296627.txt
heapdump716960.1416299494.txt
heapdump716960.1416302375.txt
trying to delete the above files
root@atec:/oratec/prodcomn/temp>rm heap*.*.txt
ksh: /usr/bin/rm: 0403-027 The parameter list is too long.
root@atec:/oratec/prodcomn/temp>rm heap*.txt... (2 Replies)
Discussion started by: filosophizer
2 Replies
10. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
rmdir(2) System Calls Manual rmdir(2)
NAME
rmdir - Removes a directory file
SYNOPSIS
#include <unistd.h>
int rmdir ( const char *path );
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
rmdir(): XSH5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies the directory pathname. The final component of the path parameter cannot be a symbolic link.
DESCRIPTION
The rmdir() function removes the directory specified by the path parameter. The directory is removed only if it is an empty directory.
For the rmdir() function to execute successfully, the calling process must have write access to the parent directory of the path parameter
with respect to all of the system's access control policies.
If the directory's link count becomes 0 (zero) and no process has the directory open, the space occupied by the directory is freed and the
directory is no longer accessible. If one or more processes have the directory open when the last link is removed, the . (dot) and ..
(dot-dot) entries, if present, are removed before the rmdir() function returns, and no new entries may be created in the directory. How-
ever, the directory is not removed until all references to the directory have been closed.
Upon successful completion, the rmdir() function marks the st_ctime and st_mtime fields of the parent directory for update.
RETURN VALUES
Upon successful completion, the rmdir() function returns a value of 0 (zero). If the rmdir() function fails, a value of -1 is returned and
errno is set to indicate the error.
ERRORS
If the rmdir() function fails, the directory is not deleted and errno may be set to one of the following values: Search permission is
denied on a component of the path parameter, or write permission is denied on the parent directory of the directory to be removed. The
process does not have write access to the parent directory with respect to one of the system's access control policies. The directory is
in use as either the mount point for a file system or the current directory of the process that issued the rmdir() function. The directory
named by the path parameter is not empty. The path parameter is an invalid address. While reading from or writing to the file system, an
I/O error occurred. Too many links were encountered in translating path. The length of the path parameter exceeds PATH_MAX, or a pathname
component is longer than NAME_MAX. The directory named by the path parameter does not exist or is an empty string. A component of the
path parameter is not a directory. The S_ISVTX flag is set on the parent directory of the directory to be removed, and the caller is not
the file owner. The directory named by the path parameter resides on a read-only file system.
[Tru64 UNIX] For NFS file access, if the rmdir() function fails, errno may also be set to one of the following values: The file position
pointer associated with the filedes parameter was negative. Indicates either that the system file table is full, or that there are too
many files currently open in the system. Indicates a stale NFS file handle. An opened file was deleted by the server or another client; a
client cannot open a file because the server has unmounted or unexported the remote directory; or the directory that contains an opened
file was either unmounted or unexported by the server.
RELATED INFORMATION
Functions: chmod(2), mkdir(2), mknod(2), rename(2), umask(2), unlink(2), mkfifo(3), remove(3)
Standards: standards(5) delim off
rmdir(2)