rmdir fails - "Operation not permitted "

Joined
Jan 6, 2012
Messages
8
Reaction score
0
Points
1
When I try to rmdir the file below


drwxrwxrwx 3 eugenecox staff - 102 Jan 6 14:07 [email protected]


I get an "Operation not permitted" error... it's driving me nuts. Any hints ?
 
Joined
Oct 22, 2007
Messages
8,967
Reaction score
287
Points
83
Location
London
Your Mac's Specs
Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
Could you give us more info

Why are you using Terminal to delete the folder

Is the folder on your mac or on a network share?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
rmdir only works on empty directories that it has permission to modify (which you appear to have). Where is this folder located and what are its contents?
 
Joined
Oct 22, 2007
Messages
8,967
Reaction score
287
Points
83
Location
London
Your Mac's Specs
Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
Could you give us more info

Why are you using Terminal to delete the folder

Is the folder on your mac or on a network share?
 
OP
G
Joined
Jan 6, 2012
Messages
8
Reaction score
0
Points
1
rmdir only works on empty directories that it has permission to modify (which you appear to have). Where is this folder located and what are its contents?


The directory name is [email protected] , and it is empty,

ls -al [email protected]
total 0
drwxrwxrwx 2 eugenecox staff 68 Jan 6 14:38 .
drwxr-xr-x 319 eugenecox staff 10846 Jan 3 11:07 ..


It is located in a directory named "My ICT Transcripts"

drwxr-xr-x 319 eugenecox staff 10846 Jan 3 11:07 My ICT Transcripts
 
OP
G
Joined
Jan 6, 2012
Messages
8
Reaction score
0
Points
1
Could you give us more info

Why are you using Terminal to delete the folder

Is the folder on your mac or on a network share?


Well, I am using the Terminal because when I drag this folder to the trash using Finder I get a prompt "Finder wants to make changes. Type your password to allow this"... which I do. The prompt window closes, I get no further errors/messages, but the folder remains there, it is not deleted.

This is on my mac, not on a network share.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
O:)

Code:
mikeMBP:testdir mike$ chflags uchg mike\@mac.com/
mikeMBP:testdir mike$ rmdir [email protected]
rmdir: [email protected]: Operation not permitted
mikeMBP:testdir mike$ chflags nouchg mike\@mac.com/
mikeMBP:testdir mike$ rmdir [email protected]
mikeMBP:testdir mike$
 
OP
G
Joined
Jan 6, 2012
Messages
8
Reaction score
0
Points
1
Dang.... that was new to me and I was very hopeful, but got the same "Operation not permitted" on the rmdir after the nouchg
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Try running it via sudo ? Might wanna toss a -f flag in there, so it'll show if it fails
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
OP
G
Joined
Jan 6, 2012
Messages
8
Reaction score
0
Points
1
OK so

/bin/ls -aleO@ [email protected]

total 0
drwxrwxrwx 2 eugenecox staff - 68 Jan 6 14:38 .
drwxr-xr-x 319 eugenecox staff uappnd 10846 Jan 3 11:07 ..

I don't know what uappnd is, using syntax from an earlier suggestion I assumed that "chflags nouappnd" would get rid of it, so I executed this "chflags nouappnd ." while in the parent directory .... after which the rmdir [email protected] was successful !
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
do it was set for append only! that makes.. sense? :) glad it's sorted.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
That was odd. I've never seen anything like that before. Using a good force switch combined with elevated privileges allows me to do anything. Glad to hear it's been sorted out.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top