0

How can I give myself permission to delete a folder from "file system/opt"? Folder owner is root. I am the only user of this computer but I did not install the OS. I am not much of a tech person but can follow instructions.

Dan
  • 1
  • 1

5 Answers5

1

First: do you really need to delete it?

Second: I would not recommend to use sudo. Instead I think it's better to always use gksudo. Why?:

You should never use normal sudo to start graphical applications as root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root.

More info: What is the difference between “gksudo nautilus” and “sudo nautilus”?

You can open a terminal,and type:

gksudo nautilus

Press Enter and a new window will open. Now you can delete anything, included things that you should not delete!

DrKenobi
  • 6,442
0

You can do

sudo chown <username>:<username> /opt

but I probably will cause the system to not work correctly

BeryJu
  • 573
0

it is not recommended to give yourself a permissions on the opt folder, this sometimes cause a security problems, so if you want to edit a file in the folder just run:

sudo nautilus

and edit the file ! :) thanks.

Madno
  • 165
  • 4
  • 13
0

Issue the following in Terminal:

sudo rm /opt/name-of_folder_or_file

will immediately delete the named file or folder. Exercise this command with caution.

douggro
  • 2,537
0

Press ALT-F2, then type: sudo rm -rv /opt/INSERT-FOLDERNAME-HERE


This only works if you have sudo permission. (You must be an Administrator user)

Yet Another User
  • 2,671
  • 3
  • 23
  • 37