[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help setting permissions on a thumb drive



On Sat, 15 Mar 2014 20:29:41 -0600
Paul E Condon <pecondon@mesanetworks.net> wrote:

> I have a 4GB thumb drive that I have formatted with two
> partitions: 
> 
> #1 is 100MB with vfat format
> #2 is all the rest with ext4 format
> 
> I want to set permissions so that I can read/write on partition #1 on
> both my Squeeze computer and on a Windows box, both as a
> non-privileged user.  The last time that I ever had any real contact
> with Windows was in the early days of Windows95, back in the last
> century. I know that back then there was not much that one could do to
> make this data interchange 'user friendly'. Has anything changed? Or
> do I still have to use root to write on a vfat partition? I wouldn't
> even bother to ask except I read in man-pages, for things related to
> mount, that a distinction is sometimes made among 'user', 'users',
> and the 'owner of the device'.  So, I think maybe some software has
> been written to clean up this mess, but probably not. So, has there
> been improvement?
> 
> On the other hand, I have no problem with partition #2. It behaves as
> it should under Squeeze, and Windows does not give any hint that it
> knows of its existence, Which is OK for me. 
> 
> But I would like to have a better way to move data on and off the vfat
> partition, if such a way actually exists.
> 

'Better'?

The 'best' way I have found is to mount USB drives on Linux by UUID and
to explicitly set user and group for the mount point. This is partly
because I find usbmount mounts some drives as both the complete drive
and its partitions, even though fdisk is happy that there is a proper
partition structure present. In these cases, I explicitly tell usbmount
to mount the entire drive on 'none' before mounting the partitions, and
this seems to prevent unpleasantness.

Yes, it's a pain, having to create fstab entries for particular drives,
but having done so, it works.

Explicit fstab entries also seems to be the only way to ensure that a
given drive mounts at a particular point, for example if you keep ssh
or VPN keys on a drive and don't want to edit the configuration file
every time you want to connect.

Oh, and if Windows tells you the drive has a problem, and offers to fix
it, don't let it. Win8 seems particularly prone to this.

-- 
Joe


Reply to: