Re: [Hampshire] External Drive Permissions.

Top Page

Reply to this message
Author: Mike Burrows
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] External Drive Permissions.
On 3/23/2011 10:04 AM, bryan hunt wrote:
> On Wed, 2011-03-23 at 09:46 -0500, Mike Burrows wrote:
>> Hi Folks.
>>
>> I have a western digital hard drive attached to a usb port on my deb
>> box. It mounts automagically on boot and I can access the file structure
>> and read/write files from a windows samba client. However, when working
>> on the Deb box I found the non-root users only had read permissions. So
>> I changed the ownership of the device (which is mounted as
>> /media/mybook) to my non-root user. Still cannot write to the external
>> drive.
>>
>> Interestingly the mount point shows linked to /dev/sda1 when the
>> properties of the device are checked. However, when I look in /dev the
>> fdd1 is mapped to sda1??
>>
>> What have I got wrong on the Deb box please?
>>
>> TIA
>> Mike
>>
>> --
>> Please post to: Hampshire@???
>> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
>> LUG URL: http://www.hantslug.org.uk
>> --------------------------------------------------------------
>
> Test it locally
>
> sudo mkdir /tmp/extdrive
>
> #this means mount the block device /dev/sda1 at location /tmp/extdrive,
> #read-write permissions with user id of 900
> sudo mount /dev/sda1 /tmp/extdrive -o rw,uid=900
>
> #Same thing but with your own uid, backticks mean run this command + get
> #the result..
> sudo mount /dev/sda1 /tmp/extdrive -o rw,uid=`id -u`
>
> Changing ownership or permissions of the /dev block device is not the
> solution.
>
>

Well I modified the above to:

sudo mount -t vfat /dev/sda1 /media/mybook -o rw,uid=1000,gid=1000


ls -l /media/mybook - shows all the files and folders on the external hard drive listed as non root user and group.

However, trying to modify files in the non-root gui isn't possible and user 1000 only has read permissions

can't help thinking there is a better way of doing this in fstab...

Where am I going wrong please?

TIA
Mike