Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1821  / 2 Years ago, sat, december 18, 2021, 6:48:13

I am trying to remove directories with files and getting a permission denied error on Ubuntu 22.04.1.


I've changed permissions to 777 for the directory and the parent directory but I still get the error.


Screenshot of the error


$ sudo rm *.* 
rm: cannot remove 'Real Economy v1.5.1-4267-1-5-1-1588544476': Permission denied
rm: cannot remove 'Witcher 3 input.settings file backup for 1.32-5844-1-32-1626358844': Permission denied

Additional


The directory containing the directories/files I'm trying to delete is a default download destination for Brave Browser and also Firefox. It's on the system disk (SSD). The browsers also won't allow me to change the download destination, which is weird. The files were downloaded here and are intended for Windows (mods for Witcher 3).


The other weird thing is that these are extracted archives (7-zip files, etc).

I CAN delete the original archive file, but once I extract it, I CAN'T remove the extracted directories/files.


More From » permissions

 Answers
1

I figured it out. It's because it's directories I'm trying to delete. For anybody else who gets this problem, the command is


rm -rf 'directory name'

That removes the directory and all subdirectories and files. Thanks to everyone for their input.


[#153] Sunday, December 19, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
imberst

Total Points: 370
Total Questions: 107
Total Answers: 123

Location: French Polynesia
Member since Tue, Jul 7, 2020
4 Years ago
;