Results 1 to 8 of 8
Dear Experts,
I own a directory, the directory permission is 000.
d--------- 2 pawan pawan 4096 Jun 1 19:16 dd
Can I delete this directory without changing the access permissions ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-03-2009 #1Just Joined!
- Join Date
- Jun 2006
- Posts
- 40
How to delete a directory with 000 permission ?? Any idea ?
Dear Experts,
I own a directory, the directory permission is 000.
d--------- 2 pawan pawan 4096 Jun 1 19:16 dd
Can I delete this directory without changing the access permissions ?
I think, If a file has permission like 000, you can delete that file, but its not working for a directory. Is it possible to delete a directory with 000 permission ?
Thanks-
Pawan
- 06-03-2009 #2
x_x, Thats a strange question.
But you can delete file/folders even if they are having 000 permissions.
In Linux directory is also a file..Deleting file = Editing the directory
So if you want permission to delete files, the parent directory should have the execute and write permission.
- 06-03-2009 #3A candle looses nothing by lighting other candles. - Khalil Zibran.
Registered Linux User #490076
- 06-04-2009 #4
- 06-04-2009 #5Just Joined!
- Join Date
- Jun 2006
- Posts
- 40
Thanks..Saivin and b2Bwild...
Thanks for your valuable suggestions....I posted here, only after trying at my end.
Per b2Bwild, I found that true, if a file has a permission 000, but inside a parent directory having the read write permissions, you can delete that 000 permission file (assumed that you're the logged in user).
But, if a parent directory has a permission 000, you can't delete either the file nor the directory, even if you're the logged in user (may be root can do that, don't know ?)
My intension was to get an expert opinion on this, so that my confusion gets off, and the reality comes into my silly mind
Thanks-
Pawan
- 06-04-2009 #6
Oh thank god you took my comment in good spirit...
It was not to insult anyway.
Yes, root can delete directories (and files) with 000 permissions. I tried with dummy directories and files just now. If you are the owner of the file/directory, you can delete it even if the permission is 000. If you are not the owner of the file/directory, then root can play terminator.(may be root can do that, don't know ?)
A candle looses nothing by lighting other candles. - Khalil Zibran.
Registered Linux User #490076
- 06-04-2009 #7Just Joined!
- Join Date
- Jun 2006
- Posts
- 40
- 06-05-2009 #8


Reply With Quote

