19

I have a USB cooldisk 8.0 GB. it was full of Windows viruses. I tried to delete them under Ubuntu 13.04, but it didn't allow me to delete anything!

I formatted it using 'Disks' to FAT filesystem and overwrite all data by zero. Again, I can't delete anything! I can't change permission of any file!

But, I can do anything by Terminal (CLI). I can create folder by mkdir. I can copy files by cp. etc. I ran sudo chmod 777 -R /media/me/USB/*, but the permission did not change:

enter image description here

I want do all this in Nautilus. It does not allow me to create folder, copy, change permissions in Nautilus (Files).

What's the problem?

Zanna
  • 70,465
mini
  • 2,325
  • 8
  • 35
  • 53

8 Answers8

23

It is not necessary to format the flash drive or to nuke the partition. You can go to mount and then change the ownership of your flashdrive. On ubuntu :

cd /media
sudo chown -R username drivename

Of course replace username by your username and drivename by the name of your flash drive.

Then you will be able to use nautilus as usual to copy/move/delete your files.

Richard
  • 981
2

Try formatting it into ext4 format, then again format it in FAT. And you can also try the command , sudo rm /media/me/USB/* . Be sure to copy your files before formatting.

1

I had the same problem. I don't know how it happened, I also used the gnome disk management app, and somehow my directory in /media had the wrong ownership:

drwxr-x--- 1 root  root  0 Sep 28  2012 me

I deleted it (after unmounting all media), plugged in a usb drive and the directory has been recreated correctly:

drwx------ 1 me    root 18 Mai  1 01:59 me

Now everything's fine again.

1

go to "users and group". Change the account type from "desktop user" or "custom" to "administrator". This will give you the permissions if you are using a personal computer

1

With my pen drive: formatting, changing partition type didn't helped.

/media/user was empty, although nautilus was showing USB as mounted.

It helped simple:

Run disks, click settings of that drive, mounting, disable automounting, identify as: I chosed simply /dev/sdb1 click OK, unmount and mout again.

Martin
  • 53
1

I had the same issue with only being able to write as root. The only thing that worked for me was to use the Terminal (assuming that "sdb" is the name of your drive)

sudo umount /dev/sdb
sudo mkdosfs -F 32 -I /dev/sdb

Again this worked in my situation when all gui solutions were failing, even opening Nautilus as root and changing permissions.

  • 2
    /dev/sdb doesn't seem right because usually only partitions contain file systems that may be mounted and not bare storage drives. Did you mean /dev/sdb1, the first partition on /dev/sdb, perhaps? – David Foerster Jan 28 '17 at 14:48
  • Hi David, I probably should have mentioned that at this point I had removed the partition completely and had an unmounted bare storage drive. The reason being that whenever I formatted the drive before sdb1 was only writable as root. When I removed the partition and formated using any of the graphical tools I had the same problem. When I did it the way I described above it finally worked. I can honestly say I don't know why it did. – glen abdelnoor Jan 28 '17 at 21:14
0

I ended up fixing this problem after assuming that the Disks software had set it. I used Disks to format the USB drive into a FAT32 partition. I made the mistake of switching the User Session Defaults in Mount Options to off then back on for that drive. That can mess with your distribution. I fixed it by going back into Disks and checked for certain that I was using the User Session Defaults first. Then I quick formatted the drive again. Once I remounted the drive with my file manager again it was all cleared up. Everything was back to usual. I had initially tried tweeking a bunch of other settings on the system but nothing helped. I never had any problems until I used that switch in Disks. It's obviously not meant to be used on removable media. You have to let your system deal with that.

0

OPTION 1

Delete All files

If you run Disk Management, and click on the usb drive (SD card in the example below)

enter image description here

Click on the gear symbol (circled in red) and format the drive. this will clear it of all files.

OPTION 2

Delete individual files

if you do not want to delete them all, open terminal with Ctrl + Alt + T and type in the following

sudo nautilus

Then navigate to your drive and delete should then work as the sudo command before nautilus gives Nautilus root privileges.

OPTION 3

If you still can not access files

You should be able to change permissions by

  • mounting it with root nautilus (su then after entering the password, type nautilus)
  • then navigate to the drive and transferring permissions to 'guest'.
Simon
  • 4,813
  • 8
  • 35
  • 52
  • As I said, I've formatted it once! I also ran gksudo nautilus /media/me/USB => failed to copy/paste/delete/etc. – mini Jun 06 '13 at 18:23
  • Try formatting to one of the Linux formats – Simon Jun 06 '13 at 18:42
  • It should be FAT! I use it in my car for listening to music. the player of car just supports FAT systemfile! – mini Jun 06 '13 at 19:00
  • 1
    You should be able to change permissions by mounting it with root nautilus (su then after password, nautilus) and transferring permissions to 'guest'. – Simon Jun 06 '13 at 19:11