I can copy any file from any device connected by USB slot to my drive , but when I copy to the USB Flash , I found error " The destination is read-only" NOTE : I try to do copy-Paste in Windows and it worked .
Asked
Active
Viewed 2,734 times
1
-
Is your USB-stick formated with NTFS? – frlan Jan 05 '17 at 12:34
-
yes , file format shown in WINDOWS NTFS – Moaaz Elneshawy Jan 05 '17 at 12:38
-
Already discussed about your issue. Have a look into this link. – BDRSuite Jan 05 '17 at 12:47
1 Answers
0
You found the error "The destination is read-only", and there is a solution.
When linux mounts Microsoft file systems, NTFS and FAT, the permissions are set when it is mounted. If you want everybody to be able to read and write, you can do it with the umask
boot option according to the following command lines.
(assumption: the pendrive is seen as /dev/sdx, replace x with the actual drive letter, for example b: /dev/sdx1 ---> /dev/sdb1)
Text after the # character is not read by the computer, it is a 'comment' only to explain to you.
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
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