Ubuntu 12.04 – Delete file & Permission denied

Hey guys, so I was trying to test JavaHL library using the test file provided on their website. The test created a bunch of folders that doesn’t allow me to delete the files. When I looked in the properties, it says “you are not the owner so you cannot change these permissions”. Don’t know if you feel the same way as I did, but I AM THE OWNER for Christ sake.

Anyways, after doing a little research, I found that it’s saying that you don’t own the folder and it’s related to the root or something like that[1]. This person provides a solution using gksu nautiluswhich doesn’t work in my case. It may or may not work in yours so you might want to take a look.

Googling a little more, here’s what I did to delete the annoying folders:

  1. Type  sudo su  in the terminal, which will make you act as a root, the super user.[2]
  2. Delete the folder/directory along with the files and subfolders insides it with the command[3]:
    rm -r folder_name

This kind of work for my case. Hope it helps you too!! Cheers~



[1] http://askubuntu.com/questions/150028/you-are-not-the-owner-message-when-trying-to-access-folder

[2] http://answers.yahoo.com/question/index?qid=20101026161613AATcQgJ

[3] http://askubuntu.com/questions/60228/how-to-remove-all-files-from-a-directory