View Full Version : [ubuntu] 9.04 Permissions in media/disk

July 5th, 2009, 07:38 PM
can anyone explain how I change the group permission to [me] from root in /media/disk-1.
I have a number two internal hard drives on which I store everything.
But files [.jpegs mostly] cannot be copied to a USB stick to pass from my 8.04 machine to my 9.04 [AMD 64bit] machine.

The permissions in both my second internal HDD and my USB stick offer me:-
"You do not have the necessary permission to change group etc etc"

I can't change anything stored on this HDD.

save us all from HELL...

Thanks all

July 5th, 2009, 07:42 PM
What file systems are you using for the second HD and USB thumbdrive?

Applications -> Accessories -> Terminal

sudo fdisk -l

July 5th, 2009, 07:49 PM
Thanks Taurus
Heres result:-

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x15631562

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9598 77095903+ 83 Linux
/dev/sda2 9599 10011 3317422+ 5 Extended
/dev/sda5 9599 10011 3317391 82 Linux swap / Solaris

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0008e18e

Device Boot Start End Blocks Id System
/dev/sdb1 1 12863 103322016 b W95 FAT32
/dev/sdb2 12864 19457 52966305 5 Extended
/dev/sdb5 19183 19457 2208906 82 Linux swap / Solaris

The 82Gb HDD is the system drive for 8.04Ubuntu with only a few things stored on it.
The 160GB drive is the one where everything gets stored.
There is the occasional 8GB USB stick too


July 5th, 2009, 07:55 PM
Do you have /dev/sdb1 (fat32/vfat) mount automatically from /etc/fstab each time you boot Ubuntu?

cat /etc/fstab
df -h

July 5th, 2009, 08:00 PM
Presumed these were two separate terminal actions thus:-

user@computer:~$ cat /etc/fstab
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=9419c6fc-9521-4856-97a4-56d72430e85e / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=7f7713f7-1ba6-4a90-a5f6-1c9910dfd6c2 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

user@computer:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 73G 24G 46G 34% /
varrun 760M 132K 760M 1% /var/run
varlock 760M 0 760M 0% /var/lock
udev 760M 60K 760M 1% /dev
devshm 760M 12K 760M 1% /dev/shm
lrm 760M 40M 721M 6% /lib/modules/2.6.24-24-generic/volatile
gvfs-fuse-daemon 73G 24G 46G 34% /home/berclas/.gvfs
/dev/sdb1 99G 97G 2.2G 98% /media/disk-1


July 5th, 2009, 08:04 PM
Do you want to have the /dev/sdb1 mounted automatically each time you boot?

Edit /etc/fstab

gksudo gedit /etc/fstab
and add this line to the end of it.

/dev/sdb1 /media/sdb1 vfat iocharset=utf8,umask=000 0 0
Save it and then create a new mount point for it.

sudo mkdir /media/sdb1
Just reboot and you should be able to write to /media/sdb1.

July 5th, 2009, 08:53 PM
Very many thanks
I'll work on your last instructions and report back.

When I was looking at chmod, chgrp and chown, I was able to change /media to [me use] and [me group].
I was not able to change /disk, or /disk-1 (USB stick) with chgrp - or any of the files therein with chmod.
It is the fact that I couldn't change any permissions on the .jpg files themselves that has flummoxed me.

What could I have been doing wrong?

Is it the case that the kernel can not allow /disk or /disk-1 to have their group changed out of 'root' for reasons to do with the operating system?


July 5th, 2009, 08:59 PM
Those commands won't work with fat32/vfat or ntfs filesystem. They only work with Linux/Unix filesystems.

July 5th, 2009, 09:03 PM
gksudo gedit /etc/fstaband add this line to the end of it.

/dev/sdb1 /media/sdb1 vfat iocharset=utf8,umask=000 0 0Save it and then create a new mount point for it.
I thought there was a move away from umask, though I know it still works, to dmask and fmask in fstab lines for fat32 mounts, in order to allow different permissions for directories and files. Is that so, or does it not matter?

July 5th, 2009, 09:57 PM
It seems bizarre that I can create a file and place it in the directory whith which I'm having trouble and can remove it - but cannot change permissions..?
How can Linux let me rm it if it won't let me chmod it?

If the commands dont work in fat32 and ntfs.. what commands can I use