The Permission denied error occurs when permissions for a file/folder are incorrectly set
To solve this problem you need to change the permissions for this or that object.
To do this, go to "Files → File Manager "
You can learn more about File Manager functions here
Select the desired item. Highlight it and click "Permissions "
Set the rights to 755
Now you can delete a file or folder.