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.

This question already has an answer here:

I have linked a new USB drive with my system and i am not able to copy any file to it. I tried to change the permission by using below command:

/media$ sudo chmod 777 0000-7D6C

"0000-7D6C" is the drive name. But it gives below message:

chmod: changing permissions of `0000-7D6C': Read-only file system

Can anybody help me please.

share|improve this question

marked as duplicate by bain, Radu Rădeanu, Eric Carvalho, LnxSlck, karel Jul 9 at 1:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I think you need to 'chown' it. Change the ownership of the drive to make it yours. you'll have to google for how to do that though. –  harisibrahimkv May 20 '12 at 10:53
    
is it FAT or NTFS ? –  Tachyons May 20 '12 at 11:02
    
Great suggestion! Yes gnome-disk-utility is so much more helpful than KDE partition Manager. Michel –  user139712 Mar 12 '13 at 15:20

2 Answers 2

This first part should be a comment, but I can't comment on questions yet: I find it very interesting that a new usb drive would not be mounted by default as the current user with read/write permissions. Are you sure that this is a new USB and hasn't been used with some other system that might have changed the permissions? Regardless... here's something that might work:

Use this command to get some useful information about your USB drive.

sudo blkid

This will list the various devices mounted on your system along with some information about them. For example here is my output for this command:

~$ sudo blkid
[sudo] password for austin: 
/dev/sr0: LABEL="HOMEWORLD2" TYPE="iso9660" 
/dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" TYPE="vfat" 
/dev/sda2: LABEL="tango-studio" UUID="f9bc8449-729e-4ae7-b1f1-5292c8e27049" TYPE="ext4" 
/dev/sda3: LABEL="XP" UUID="0C70E36470E352CE" TYPE="ntfs" 
/dev/sda5: TYPE="swap" 
/dev/sda6: LABEL="ubuntu-11.10" UUID="54d4f2c0-16f3-4385-b896-4ca1732edda9" TYPE="ext4" 
/dev/sda7: LABEL="home" UUID="59aba69a-2bbb-43ca-b296-81b7fc16323a" TYPE="ext4" 
/dev/sda8: LABEL="data" UUID="3abb7974-6402-4de5-bfd7-f4b3af8f7ca7" TYPE="ext4" 
/dev/sdb1: LABEL="TOSHIBA EXT" UUID="583AA2D33AA2AE06" TYPE="ntfs" 

The last entry is my external USB drive. Note down the UUID and TYPE of your external drive.

You can make sure that your drive is automatically mounted as your current user by adding a line in your /etc/fstab file. The fstab file sets the default mount options for your devices. Here is some more information about fstab: https://help.ubuntu.com/community/Fstab

Backup your fstab file before modifying it sudo cp /etc/fstab /etc/fstab.bak and then you will have to edit it as root gksudo gedit /etc/fstab

In the following examples replace the following variables with your own info:

[your UUID] = the UUID you found for your device from the blkid command

[your mount-name] = the name you want the device to be mounted as, for example "EXTERNAL-USB" (not incredibly important what you choose)

[user_name] = name of your computer

If your USB's filesystem is NTFS use something like this:

UUID=[your UUID]  /media/[user_name]/[your mount-name]  ntfs-3g  user,uid=1000,gid=100,dmask=027,fmask=137  0  0

If your USB's filesystem is FAT use something like this:

UUID=[your UUID]  /media/[user_name]/[your mount-name] vfat user,uid=1000,gid=100,dmask=027,fmask=137  0  0

example : UUID=B4FE-531 /media/ajay/Win7_sp1_32vfat user,uid=1000,gid=100,dmask=027,fmask=137 0 0

The options uid=1000,gid=100 will set the drive as owned by the default user in Ubuntu (hopefully you) and the group "users". The options dmask=027,fmask=137 set the permissions to read/write. With NTFS theoretically you can now also use the option "permissions" to make it compatible with Linux permissions but I have never tried this.

Hopefully this helps. Good luck.

share|improve this answer
    
Thanks the modification to /etc/fstab helped. I was aware of it already but the precise parameters and values helping resolve a usb which was continuously mounting at /media/usb0 –  fayyazkl May 30 '13 at 8:39

I got this solved (with GUI's to make it easier...)

  1. chmod and chown... these are all to complicated, and would involve - for me, complicated "command line changes" in terminal...(didn't want to have to do this time-consumming method...especially for me...a linux "newbie.")

  2. My Intent: I have two usb devices: one is a 32gb flashcard, and the other is a 33gb SD card...

  3. I slipped both in to usb ports on my computer...they popped up on the desktop...(I'm using "MountManager" which has a configuration for an auto installation...and I had that activated...HOWEVER...though these devices showed up on my desktop AND I COULD CLICK ON THEM AND "OPEN" both of them...(I got "MountManager" as a download from "SoftwareManager"...it does not show up in ppa's using Synaptics Package Manager...it's kind of complicated...and I dont' know how to use it well...anyway SOMEHOW ...I have "auto mounting" of USB CARDS and/or FLASHDRIVES with one of these programs...that one, or maybe something else...bottom line: the various programs MOUNT the drives...but they are ONLY READABLE...I of course want to have them fully useable like in win7/vista, etc...

a. I could NOT DRAG ANY FILES OR URLS off the desktop INTO THEM...

b. I did a google search to SEE IF THEIR WAS SOME KIND OF GUI to alter settings for these USB's so you could move docs in/out...change them, etc. AND I FOUND A GUI THAT SOME HOW DOES THIS...

c. the program is: gnome-disk-utility (this was in synaptics package manager) ...so I downloaded this and installed it...I was using "palim" (for Palimpsest...someone online said when this came out you could do all kinds of ownership changes in a GUI...I don't know that...BUT...

d. I installed the program: it's in the menu (I'm using the ubuntu based LINUX MINT 14NADIA with an XFCE desktop overlay...best combo I've found, etc.)...anyway...it's shows up in the menu as: "Disks" and I know it's a "gnome"thing...anyway...

e. I pull up this program AND IT SHOWS MY TWO USBs (one is a flash card and one is an SD card)...AND IT SHOWS THEM MOUNTED...

F. HERE'S WHAT HAPPENED NEXT... a. all the other MOUNT PROGRAMS I tried: mount these "usb cards/drives" AS "/media/usb0 or usb1... SO THEY ARE MOUNTED/AUTOMOUNTED ...BUT THEY ARE "READ-ONLY"

G. the "gnome-disks" program... a. I "unmounted the usb's" AND "REMOUNTED BOTH OF THEM" using "gnome-disks"

h. BIG CHANGE...the USB's were NO LONGER MOUNTED AS: /media/usb0 or usb1 ...which are probably in "not-owner permission" directories (that's why the problem, I think...)

anyway...the "gnome-disk" program REMOUNTED THESE "USB's" as:

/media/YYYYYYYY/"XXXX-XXXX" (so this is a whole different MOUNT POINT)

THE NEW REMOUNTED POINT BY gnome-tools is different...

the YYYYYYYY is "my actual owner name" THAT I USE WITH A PASSWORD TO START linux mint, etc.

the XXXX-XXXX is a "assigned DRIVE id number"

ANYWAY...BOTTOM LINE: I can read write, drag stuff into these USB's on my desktop now...which was what I wanted to be able to do, etc.

/////////////// NOW HERE'S A COUPLE PROBLEMS...I'm still using "MountManager" that's the program that seems to AUTO-INSTALL THE USBS...(but read only)

NOW, when I "unmount and remount them" WITH "gnome tools" THE REMOUNT "ONLY LASTS FOR THE SESSION (time the usb card/drive is in the usb port)...once I remove the usb card...and STICK IT BACK IN...the DRIVE REVERTS to "once again only READABLE"...

SO, I HAVE TO "pull up" the "gnome-disks" program AGAIN...and "unmount and REMOUNT" THE usbs...THEN, THEY WORK AGAIN...READ/WRITE/DRAG/DROP...ETC.

note: (gnome-disks) HAS AN "auto mount" configuration...but when I tried using it AND GETTING RID OF MY OTHER PROGRAMS...stuff got screwed up...I think the program MIGHT HAVE BEEN COMPETED WITH ONE ANOTHER TO "AUTOMOUNT"...

anyway...I'll be working on a solution FOR THAT...but for the time being...

do what I said above...AND YOU SHOULD BE ABLE TO "FULLY ACCESS/USE" YOUR USB'S (probably any external drives, etc.)

apparently "gnome-disks" GOES THE XTRA MILE...and doesn't JUST ASSIGN a "/media/usb"

BUT ACTUALLY INSTALLS THESE USB TYPE DEVICES...like win7 would, etc.

anyway,

hopes this helps some newbies, etc.

FLASHROB

share|improve this answer
    
update: now I just slip in the "usb flashcard or SD card" into a usb-slot...THEN: right-click on the "desktop icon" of the flash or SD card...and click on "MOUNT" ...and now the usb device is mounted as a "uuid device" off your owner directory... –  flashrob Feb 7 '13 at 19:35

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