Unable to delete directory even with 777 perm


 
Thread Tools Search this Thread
Operating Systems Solaris Unable to delete directory even with 777 perm
# 1  
Old 02-03-2012
Error 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
# 2  
Old 02-04-2012
You have to have write permissions on the parent directory to remove "tmp".
# 3  
Old 02-04-2012
What are the permissions for
Code:
/apps/abinitio/data/serial/landing_zone/ent/adw/policy_cmcl/backup/15_07_2011

# 4  
Old 02-04-2012
Parent directory was missing write permission.Thanks!
I thought parent directory permission would not matter for determining access level for inside directory. Smilie
# 5  
Old 02-05-2012
Directory permissions are easier to understand if you image directory as a text file. Deleting/modifying any content in the directory is equivalent to deleting a line or word from a text file. You need to have write permission for that. Listing a directory content is similar to reading a text file and needs read permission. cd-into a directory is somewhat similar as executing a script file. For that, you need execute permission.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script needed to delete to the list of files in a directory based on last created & delete them

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

2. AIX

Unable to delete files

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

3. UNIX for Dummies Questions & Answers

Unable to run files with 700-777 permissions

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

4. UNIX for Dummies Questions & Answers

How to find directory listing from root to all files in tree format with details of perm/own/grp?

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

5. Solaris

Unable to create or delete a directory in /usr with root user

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

6. Cybersecurity

can another user 777 and existing 777 dirctory?

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

7. Solaris

scp prompt when home directory is 777

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

8. UNIX for Dummies Questions & Answers

Unable to delete files

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

9. UNIX for Advanced & Expert Users

unable to create any directory that uses numbers as the directory name

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

10. UNIX for Dummies Questions & Answers

unable to delete a file

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
Login or Register to Ask a Question