1

I accidentally created, with Clonezilla, a disk image file into my Ubuntu hard drive (it's actually a folder with many files within). I have since learned how to use Clonezilla correctly and save disk image files to my external hard drive. But now I can't figure out how to change the permission so I can move this gigantic file to the trash and delete it.

UPDATE: When I run sudo chown -R YOURUSERNAME 2018-09-11_zilla.disk_image I get

"chown: cannot access '2018-09-11_zilla.disk_image': No such file or directory."

Except that IS the name of the folder! So if just one character is wrong, even I know - it's not going to work.

K7AAY
  • 17,202
m7_
  • 31
  • What are the ownership/permissions of the file and the directory it's in? Are you command-line literate, or do you need GUI solutions? – waltinator Sep 12 '18 at 17:30
  • When I open the Clonezilla folder & look at the permissions, it says "You are the owner, so you cannot change these permissions." – m7_ Sep 12 '18 at 18:14

2 Answers2

1

The Clonezilla is in your home folder /home/user(your username) or the the system folder (/) or somewhere ? For example, in the first case you can open a terminal and run this command whether the folder is named Clonezilla sudo rm -Rf Clonezilla/ Enter. This command delete the files under Clonezilla directory.

In the latter case, open a terminal and delete the appropriate folder ( for example, /opt/Clonezilla) cd /opt/ Enter sudo rm -Rf Clonezilla/ Enter. This command delete the files under /opt/Clonezilla/ directory

If you are not sure whether to use the terminal or not, please do this. Could you open your file manager and with your mouse and right click on the folder and select properties from the menu displayed?. Look at the permission tab and told what permissions you have and write the output in order to proceed with a solution. You can try to change the permissions with the drop down menu on the permission tab. Another related question is whether you can see with your file explorer an icon different from the folder icon, may be it was locked for a root user. I Ubuntu you can use the terminal as I showed before with sudo to delete the directory. Regards,

  • I'm believe Clonezilla file is in the System folder ("/"). But your Terminal Command suggestions are confusing to me. The name of the Clonezilla file is: "2018-09-11_zilla.disk_image" I have used Terminal successfully a few times, would love to know how to write a command to delete this file. – m7_ Sep 12 '18 at 18:19
0

A commmand line solution requires you open a terminal window, move to the directory above the folder to remove, and perform

sudo chown -R YOURUSERNAME /path/to/folder 

where the -R is for "recursive", thanks to Saad Mirza. Then delete the target folder and all its folders and files, courtesy of user784637 with

sudo rm -rf /path/to/directory

To do this a la GUI in the Nautilus file manager which ships with Ubuntu, open a terminal window. This requires adding PolicyKit extensions with

sudo apt-get install nautilus-admin  

Then you can launch Nautilus as if you were admin

pkexec nautilus 

to take ownership and delete the folder in question.

K7AAY
  • 17,202
  • I your browser, highlight the command and copy with Ctrl-C (or Cmd-C on a Mac), then switch to the terminal window, and paste it in with Ctrl-Shift-V . – K7AAY Sep 13 '18 at 20:09