# Cannot delete, rm: folder-name/: Operation not permitted



## MrThinker (Feb 10, 2012)

I have little problem when I want to delete a folder and its contents, I cannot delete this folder even I login as root.

I tried this command to delete folder which name is "Pindahan My Music":

[CMD=]rm -rv Pindahan\ My\ Music/[/CMD]

then the output said:


```
rm: Pindahan My Music/Kategori Campuran/Accoustic & live kolonial/No Doubt - Just A Girl (Acoustic).mp3: Operation not supported
rm: Pindahan My Music/Kategori Campuran/Accoustic & live kolonial/2 Pac - Thug Mansion (acoustic).mp3: Operation not supported
rm: Pindahan My Music/Kategori Campuran/Accoustic & live kolonial/25 Minutes.mp3: Operation not supported
:
:
:
:
# a lot of "Operation not supported" things.
:
:
:
:
```

*T*his is the output of *ls -l* command:


```
drwxr-xr-x  1 root  wheel     0 Feb  2  2007 Pindahan My Music
```

this is the output of *ls -l* command, inside "Pindahan My Music":


```
total 0
drwxr-xr-x  1 root  wheel  0 Feb  5  2007 Kategori Campuran
drwxr-xr-x  1 root  wheel  0 Feb  1  2007 Kategori Kolonial
drwxr-xr-x  1 root  wheel  0 Feb  1  2007 Kategori Pribumi
drwxr-xr-x  1 root  wheel  0 Feb  1  2007 ZzzT..Lirik
```

The location of folder is in external drive that I mount manually to /mnt/hd1 (as root). hd1 is a folder I made (as root).

*W*hat should I do to delete "Pindahan My Music"?


----------



## SirDice (Feb 10, 2012)

MrThinker said:
			
		

> The location of folder is in external drive that I mount manually to /mnt/hd1 (as root).


Did you mount it read-only?


----------



## phoenix (Feb 10, 2012)

And what's the filesystem on it?


----------



## MrThinker (Feb 11, 2012)

The file system is NTFS, so I type this:

`# mount -t ntfs /dev/ada1p3 /mnt/hd1`


----------



## Beastie (Feb 11, 2012)

MrThinker said:
			
		

> The file system is NTFS, so I type this:
> 
> [CMD="mount command"]mount -t ntfs /dev/ada1p3 /mnt/hd1[/CMD]


And suddenly everything made sense! 

mount_ntfs(8):


> [...]
> 
> WRITING
> There is limited writing ability.	Limitations: file must be nonresident
> ...



So install and configure sysutils/fusefs-ntfs. Search the forums if you have any trouble with it. There are many thread about it.


----------



## MrThinker (Feb 11, 2012)

SOLVED !

Finally, I should use fusefs-ntfs to do rw on NTFS filesystem. Sorry for my silly question.

Thank you for everyone in this thread.


----------



## cederom (Jan 29, 2021)

I have encountered similar issue when removing kernel build outputs under `/usr/obj`. It turned out that some files had special immutable flags set and this flag can be removed with `chflags -R noschg /usr/obj`


----------

