0

My USB device has been formatted to Fat32. gparted shows it as /dev/sdd1 with mount point /media/ray/1768-274C Device's 'Properties' shows Permissions as:

Owner : Me
Access: Create and delete files

Group: ray ( Note: so far as I'm concerned Me = ray!)
Access: None

Others:
Access: None

I have read, and tried my best to follow most of the questions listed as "of interest" but none seem to work; my latest attempt was:-

ray@ray-Aspire-5735:~$ sudo chown -R media/ray/1768-274C
chown: missing operand after ‘media/ray/1768-274C’
Try 'chown --help' for more information.

This command line was from an edit to another related question. There was no operand after the device name so I'm at a loss to know how to make the change/s

EDIT:

Tried all the suggestions with no results (ie permissions on the device remain the same)

Result from sudo blkid was:-

/dev/sdd1: UUID="1768-274C" TYPE="vfat"

When I tried to change fstab I got:-

root@ray-Aspire-5735:~# sudo cp /etc/fstab /etc/fstab.bak 
root@ray-Aspire-5735:~# gksudo gedit /etc/fstab
(gedit:4099): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:4099): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

What am I doing wrong?

8
  • 1
    You shouldn't need to change the owner, as you are the owner already, and you have create, and delete access.
    – user68186
    Oct 20, 2014 at 21:31
  • Try running sudo chown ray:users /media/ray/1768-274C Oct 20, 2014 at 21:31
  • @RPiAwesomeness should be sudo chown ray:ray /media/ray/1768-274C where the first ray is the user and the secone ray is the default group of the user ray. However, this won't change anything, as this should be (and is, as per the first part of the question) the default.
    – user68186
    Oct 20, 2014 at 21:33
  • Well, unless he's wanting to keep this USB stick personal, then it wouldn't hurt to allow the users group (which all users are in by default) to access it as well. However, your command would work just fine. Oct 20, 2014 at 21:35
  • FAT32 doesn't support access rights. What do you want to change the rights to anyway? Who do you want to grant or deny what kind of access? Oct 21, 2014 at 11:28

2 Answers 2

1

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

sudo blkid

Ex output last line : /dev/sdb1: LABEL="TOSHIBA EXT" UUID="583AA2D33AA2AE06" TYPE="ntfs"

use the command and note down the UUId of the USB drive

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.

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.

Hopefully this helps

1
  • there is a question update related to your answer.
    – Lety
    Oct 21, 2014 at 11:31
1

Test this:

Open a terminal,

Press Ctrl+Alt+T

Run it:

sudo -i
chmod -Rf 777 /media/ray/1768-274C 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .