0

I'm running Ubuntu 16.04 and earlier today it was working just fine but now I'm having problems editing files on my usb stick. All I did today was installing some themes and a firewall (gufw), maybe it's the firewall?

when I try to do something it says "the destination is read only" and I can't change the permission, it says I'm not the owner.

however I'm able to edit just fine using gksudo nautilus.

how can I solve this problem? I'm new to Ubuntu (and Linux), i've been using it for two days. It would be great if tell me how to fix this step by step

I tried using ntfs and fat32

1 Answers1

0

Mount a FAT32 partition in a USB stick with write permissions for everybody

Assumption: the pendrive is seen as /dev/sdx, replace the partition device sdxn with the actual letters for the partition, for example sdb1: /dev/sdxn ---> /dev/sdb1.

Explanation: x is the drive letter, and n is the partition number. Text after # is a comment (not used as a command).

sudo mkdir -p /mnt/sd1  # only if you want a new mountpoint
sudo umount /dev/sdxn   # general: only if already mounted (with bad permissions).
sudo umount /dev/sdb1   # example

sudo mount -o rw,users,umask=000 /dev/sdxn /mnt/sd1  # general: mount
sudo mount -o rw,users,umask=000 /dev/sdb1 /mnt/sd1  # example

ls -ld /mnt/sd1                          # check permissions

sudo bash -c "echo 'Hello World' > /mnt/sd1/hello.txt"  # test writing with sudo
cat /mnt/sd1/hello.txt                   # test reading (as user)
ls -l /mnt/sd1                           # check permissions of the content
rm /mnt/sd1/hello.txt                    # test removing (as user)
echo 'I am a user' > /mnt/sd1/user.txt   # test writing (as user)
sudodus
  • 46,324
  • 5
  • 88
  • 152