Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to copy any file to my external hard drive. But always when I tried to do this I have next output:

cp: cannot create regular file /media/NameOfCard/[file]' : Read only file system

I also tried:

sudo chmod -R 775 /media/NameOfCard
sudo chmod -R 777 /media/NameOfCard

But the same effect - ... Read only file system

Update:

After mount I have next output:

nazar_art@nazar-desctop:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sdb1 on /media/sdb1 type vfat (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/nazar_art/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=nazar_art)

Any suggestions?

  • How to solve this trouble and let permission to copy and delete files to hard drive?
share|improve this question
1  
If the media is a SD card, be sure the card has not the physical switch in lock position. –  jap1968 Aug 21 '13 at 6:44
    
@jap1968 yes, exactly it's SD card. How can I check this locking? –  nazar_art Aug 21 '13 at 9:50
    
There is probably a little switch on the side of the SD card labled "lock". –  David Purdue Aug 21 '13 at 22:24
    
This is the switch they're talking about: i.imgur.com/gZKqADK.jpg; try flipping it. –  Alaa Ali Aug 22 '13 at 8:02

4 Answers 4

up vote 1 down vote accepted

Try this:

mount -o rw,remount /dev/<devicename> /path/of/device/mount/directory

Example:

mount -o rw,remount /dev/sdb1 /media
share|improve this answer
1  
I tried and output is: mount: you must specify the filesystem type –  nazar_art Aug 21 '13 at 10:04

also try this... Open nautilts file manager as root..by typing following command in terminal..

sudo -i

now enter the password

now open nautilts file manager by typing nautilts in terminal

now find your external hard disk on nautilts file manager and open properties of your external hard disk..

Now click permissions tab and change file access to read write..

share|improve this answer

As the message says, it is the whole external disk file system that is mounted read-only.

Use the mount command in a terminal to check the status of the disk - e.g.

/dev/sdc1 on /media/davidp/PHOTOGRAPHS type vfat (rw,nosuid,nodev,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

For my example the first indicator in () is rw, which means read-write. I am betting yours says ro.

If that is the case, then the next trick is to find out why. Is the device set to be read only (some media has a switch to set it read only)? Is the file system corrupt? Could be many things.

share|improve this answer
    
No command 'vfat' found, did you mean: Command 'vcat' from package 'atfs' (universe) vfat: command not found . On windows OS all work perfect with this card. –  nazar_art Aug 21 '13 at 10:02
    
No - the line I quoted was the result, not the command. In a terminal window, at the shell prompt, type mount - it is the result of that you want to see. The result of that will also show you the file system type, which will help with @papseddy 's answer –  David Purdue Aug 21 '13 at 22:21
    
I updated question and sdc isn't present as mount? How to solve this at right way? –  nazar_art Aug 22 '13 at 7:39
    
sdc was just an example, your mileage may vary. Looks like the card is mounted on /media/sdb1, and is mounted read-write. What happens now if you cd /media/sdb1 ; ls -l ; sudo touch example –  David Purdue Aug 23 '13 at 0:01

I'm new to Linux so its quite most this isn't the best way to achieve this goal, but while I had the drive plugged into a mac in order to turn of journaling a also added a new user that matched my Linux username to the permissions of the drive. I can read and write the drive now.

share|improve this answer
    
This doesN't really answer the question. –  guntbert Jun 29 at 19:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.