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?

MadMike
  • 4,275
  • 8
  • 29
  • 50

2 Answers2

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

BDRSuite
  • 3,196
  • 1
  • 13
  • 11
1

Test this:

Open a terminal,

Press Ctrl+Alt+T

Run it:

sudo -i
chmod -Rf 777 /media/ray/1768-274C 
kyodake
  • 17,808