OSX : rmdir âpermission deniedâ but directory removed

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on Downloads.
I issued rmdir -p /Users/myself/Downloads/test
and got rmdir: /Users/myself/Downloads: Permission denied
, but the test directory was deleted.
So why do I have this message? Should I care?
I'm using OSX Lion 10.7.3.
command-line permissions osx directory rm
add a comment |Â
up vote
0
down vote
favorite
I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on Downloads.
I issued rmdir -p /Users/myself/Downloads/test
and got rmdir: /Users/myself/Downloads: Permission denied
, but the test directory was deleted.
So why do I have this message? Should I care?
I'm using OSX Lion 10.7.3.
command-line permissions osx directory rm
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on Downloads.
I issued rmdir -p /Users/myself/Downloads/test
and got rmdir: /Users/myself/Downloads: Permission denied
, but the test directory was deleted.
So why do I have this message? Should I care?
I'm using OSX Lion 10.7.3.
command-line permissions osx directory rm
I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on Downloads.
I issued rmdir -p /Users/myself/Downloads/test
and got rmdir: /Users/myself/Downloads: Permission denied
, but the test directory was deleted.
So why do I have this message? Should I care?
I'm using OSX Lion 10.7.3.
command-line permissions osx directory rm
command-line permissions osx directory rm
edited Aug 21 at 3:24
Rui F Ribeiro
36.7k1271116
36.7k1271116
asked Jun 10 '12 at 12:18
politicus
1116
1116
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
From man rmdir:
-p, --parents
remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'
So your rmdir call tries to delete test (succeeds), then tries to delete the parent directory Documents (or rather Downloads) and fails... I think. I'd rather have expected some "directory not empty" error, because why shouldn't you have the permissions to delete this folder?
Thanks sr_ for your answer. You are right it is "Downloads" not "Documents". Maybe I can't delete "Downloads" because one just can't delete "Downloads" because of a "This folder is required by OS X" thing...
â politicus
Jun 10 '12 at 13:20
Possibly, I don't know anything about how OS X alters the general "UNIX-like"-ness encountered everywhere else. :)
â sr_
Jun 10 '12 at 13:31
I tried to delete the folder "Sites" via Finder and got that kind of message.
â politicus
Jun 10 '12 at 13:38
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
From man rmdir:
-p, --parents
remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'
So your rmdir call tries to delete test (succeeds), then tries to delete the parent directory Documents (or rather Downloads) and fails... I think. I'd rather have expected some "directory not empty" error, because why shouldn't you have the permissions to delete this folder?
Thanks sr_ for your answer. You are right it is "Downloads" not "Documents". Maybe I can't delete "Downloads" because one just can't delete "Downloads" because of a "This folder is required by OS X" thing...
â politicus
Jun 10 '12 at 13:20
Possibly, I don't know anything about how OS X alters the general "UNIX-like"-ness encountered everywhere else. :)
â sr_
Jun 10 '12 at 13:31
I tried to delete the folder "Sites" via Finder and got that kind of message.
â politicus
Jun 10 '12 at 13:38
add a comment |Â
up vote
4
down vote
accepted
From man rmdir:
-p, --parents
remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'
So your rmdir call tries to delete test (succeeds), then tries to delete the parent directory Documents (or rather Downloads) and fails... I think. I'd rather have expected some "directory not empty" error, because why shouldn't you have the permissions to delete this folder?
Thanks sr_ for your answer. You are right it is "Downloads" not "Documents". Maybe I can't delete "Downloads" because one just can't delete "Downloads" because of a "This folder is required by OS X" thing...
â politicus
Jun 10 '12 at 13:20
Possibly, I don't know anything about how OS X alters the general "UNIX-like"-ness encountered everywhere else. :)
â sr_
Jun 10 '12 at 13:31
I tried to delete the folder "Sites" via Finder and got that kind of message.
â politicus
Jun 10 '12 at 13:38
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
From man rmdir:
-p, --parents
remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'
So your rmdir call tries to delete test (succeeds), then tries to delete the parent directory Documents (or rather Downloads) and fails... I think. I'd rather have expected some "directory not empty" error, because why shouldn't you have the permissions to delete this folder?
From man rmdir:
-p, --parents
remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'
So your rmdir call tries to delete test (succeeds), then tries to delete the parent directory Documents (or rather Downloads) and fails... I think. I'd rather have expected some "directory not empty" error, because why shouldn't you have the permissions to delete this folder?
edited Jun 10 '12 at 12:58
answered Jun 10 '12 at 12:46
sr_
12.8k3042
12.8k3042
Thanks sr_ for your answer. You are right it is "Downloads" not "Documents". Maybe I can't delete "Downloads" because one just can't delete "Downloads" because of a "This folder is required by OS X" thing...
â politicus
Jun 10 '12 at 13:20
Possibly, I don't know anything about how OS X alters the general "UNIX-like"-ness encountered everywhere else. :)
â sr_
Jun 10 '12 at 13:31
I tried to delete the folder "Sites" via Finder and got that kind of message.
â politicus
Jun 10 '12 at 13:38
add a comment |Â
Thanks sr_ for your answer. You are right it is "Downloads" not "Documents". Maybe I can't delete "Downloads" because one just can't delete "Downloads" because of a "This folder is required by OS X" thing...
â politicus
Jun 10 '12 at 13:20
Possibly, I don't know anything about how OS X alters the general "UNIX-like"-ness encountered everywhere else. :)
â sr_
Jun 10 '12 at 13:31
I tried to delete the folder "Sites" via Finder and got that kind of message.
â politicus
Jun 10 '12 at 13:38
Thanks sr_ for your answer. You are right it is "Downloads" not "Documents". Maybe I can't delete "Downloads" because one just can't delete "Downloads" because of a "This folder is required by OS X" thing...
â politicus
Jun 10 '12 at 13:20
Thanks sr_ for your answer. You are right it is "Downloads" not "Documents". Maybe I can't delete "Downloads" because one just can't delete "Downloads" because of a "This folder is required by OS X" thing...
â politicus
Jun 10 '12 at 13:20
Possibly, I don't know anything about how OS X alters the general "UNIX-like"-ness encountered everywhere else. :)
â sr_
Jun 10 '12 at 13:31
Possibly, I don't know anything about how OS X alters the general "UNIX-like"-ness encountered everywhere else. :)
â sr_
Jun 10 '12 at 13:31
I tried to delete the folder "Sites" via Finder and got that kind of message.
â politicus
Jun 10 '12 at 13:38
I tried to delete the folder "Sites" via Finder and got that kind of message.
â politicus
Jun 10 '12 at 13:38
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f40431%2fosx-rmdir-permission-denied-but-directory-removed%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password