Cannot delete a folder recursively even as root

Michael Neumann mneumann at ntecs.de
Sun Feb 16 09:21:26 PST 2025


Take a look at man chflags 1. The "schg" flag is likely set. You have to remove it recursive via chflags -R noschg 

-- Michael 

Am 16. Februar 2025 18:07:50 MEZ schrieb Martin Ivanov <marto1980 at gmail.com>:
>I am actually root as you can see from the command prompt. The file system
>is hammer2.
>
>Best regards,
>Martin
>
>Bridger Dyson-Smith <bdysonsmith at gmail.com> schrieb am So. 16. Feb. 2025 um
>19:03:
>
>> Hi Martin,
>>
>>
>> On Sun, Feb 16, 2025, 11:52 AM Martin Ivanov <marto1980 at gmail.com> wrote:
>>
>>> Hello,
>>> I have dfly version 6 installed. I created a folder named /compat/freebsd
>>> under /, where I unpacked the recent freebsd base package in the hope to
>>> reconcile problems with freebsd deps. Now I have given up on that and I
>>> want to delete the /compat/freebsd directory. However, what I get is:
>>>
>>> root at dragonfly:/home/marto # rm -rf /compat
>>> recursively remove /compat? y
>>> rm: /compat/freebsd/sbin/init: Operation not permitted
>>> rm: /compat/freebsd/sbin: Directory not empty
>>> rm: /compat/freebsd/usr/bin/crontab: Operation not permitted
>>> rm: /compat/freebsd/usr/bin/passwd: Operation not permitted
>>> rm: /compat/freebsd/usr/bin/su: Operation not permitted
>>> rm: /compat/freebsd/usr/bin/login: Operation not permitted
>>> rm: /compat/freebsd/usr/bin/chpass: Operation not permitted
>>> rm: /compat/freebsd/usr/bin: Directory not empty
>>> rm: /compat/freebsd/usr: Directory not empty
>>> rm: /compat/freebsd/libexec/ld-elf.so.1: Operation not permitted
>>> rm: /compat/freebsd/libexec/ld-elf32.so.1: Operation not permitted
>>> rm: /compat/freebsd/libexec: Directory not empty
>>> rm: /compat/freebsd/var/empty: Operation not permitted
>>> rm: /compat/freebsd/var: Directory not empty
>>> rm: /compat/freebsd/lib/libthr.so.3: Operation not permitted
>>> rm: /compat/freebsd/lib/librt.so.1: Operation not permitted
>>> rm: /compat/freebsd/lib/libc.so.7: Operation not permitted
>>> rm: /compat/freebsd/lib/libcrypt.so.5: Operation not permitted
>>> rm: /compat/freebsd/lib: Directory not empty
>>> rm: /compat/freebsd: Directory not empty
>>> rm: /compat: Directory not empty
>>>
>>> What is going on? Any ideas will be appreciated.
>>>
>>
>> Possibly a permissions issue? `sudo` or `su` to root?
>>
>>>
>>> Best regards,
>>> Martin
>>>
>>
>> Best,
>> Bridger
>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20250216/fc714e3d/attachment.htm>


More information about the Users mailing list