Score:-4

how to force delete a directory when it says permission denined -> even with root access

ng flag

I was just working on my kernel project. when I extracted the .iso file, I got everything I expected, all except for that the "boot" and "system" directories were with some lock symbol to free up space, I deleted the files (outside the directories) but unable to delete those 2 folders in the "files" application - even the content.

While using rmdir in the terminal, it says "permission denied", even with root access. (also tried "sudo rmdir").

How to fix, please?

in flag
What is the output of `lsattr` on the contents of the directory that you would like to delete? If you see something like `----i--------—-`, then you're dealing with immutable files and you'll need to use `chattr` to *ch*ange their *attr*ibutes
user135142 avatar
ng flag
getting just "e". but don't know what to change @matigo .
Score:0
my flag

First, try removing it recursively and forcefully:

 sudo rm -rf /path/to/directory

If sudo is not working then try logging in as root to recursively delete the directory:

sudo su                  # Login as root 
rm -rf /path/to/directory           # remove the directory 
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.