0

After a failed upgrade from 14.04 to 16.04, I had to make a live usb hoping to make a copy of my files before installing 16.10 from scratch. The problem is that answers I have found on this site or other ones have not worked for me. I cannot copy/paste my files to the external drive because I do not have permissions. I can open my folders and my files, just not copy them over. I followed the instructions on nautilus here but the problem remains Any help will be very appreciated

Update: turming off the computer and back on again seems to have resolved the problem partially. It stills tells me about some files that I don't have permission to copy but most of them get copied over

Pulse
  • 101

1 Answers1

0

If you have a Microsoft file system (FAT32 or NTFS) in the external drive, the linux permissions will be set when it is mounted. So you need to mount it with read/write permissions. The following should work for FAT32 (and probably the same or something very similar for NTFS).

Unmount the partition on the external drive if mounted. (If you 'eject' it, you have to unplug and re-plug.)

sudo umount /dev/sdx1

Mount a FAT32 partition in a pendrive with read/write permissions for everybody:

(assumption: the pendrive is seen as /dev/sdx, replace x with the actual drive letter, for example b: /dev/sdx1 ---> /dev/sdb1)

sudo mkdir -p /mnt/sd1  # only if you want a new mountpoint
sudo umount /dev/sdx1   # only if already mounted (but with bad permissions)

sudo mount -o rw,users,umask=000 /dev/sdx1 /mnt/sd1  # mount

echo 'Hello World' > /mnt/sd1/hello.txt  # test writing
cat /mnt/sd1/hello.txt                   # test reading

Edit: Try to copy the 'stubborn' files with sudo permissions

sudo cp stubborn-file /directory-on-target-drive/

for example

sudo cp stubborn-file /mnt/sd1/backup-dir/

or

sudo cp -r stubborn-directory-tree /mnt/sd1/backup-dir/
sudodus
  • 47,684