Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Re: best practices for an external hard drive that many hosts might use?



 On Wed, Nov 21, 2007 at 01:37:25PM -0500, Kristian Erik Hermansen wrote: 
> On Nov 21, 2007 12:36 PM, Brendan Kidwell <[hidden email]> wrote: 
> > Ideally I would like it to behave the same as any FAT32-formatted USB 
> > storage device is typically mounted: You plug it in and your desktop 
> > automatically mounts it under a folder like "/media", and any user who can 
> > access such mounts has FULL access on ALL files in the external device. In 
> > other words, I want to dispense with file-level permissions. 
[...] 
> 
> I think all you should need to do is mount it with the 'users' options 
> and possibly a umask that allows everyone to write to it.   

I can not easily test to verify (I have no firewire devices, and I 
would need to reformat a USB device as ext3 to test that; but I have 
none handy and wouldn't want to reformat even if I did), but I believe 
what you suggest does not work the way you think it does. 

The "user" or "users" options, if I'm not mistaken, merely allow 
non-root users to mount the specified filesystem; they do not affect 
the ownership or permissions of the files on the disk.  USB disks do 
indeed auto-mount on /media, but I have no experience with firewire 
(which Brendan mentioned his hardware is), and I'm not sure that 
firewire devices behave the same way.  So that may or may not happen. 
The process that handles this on modern Linux systems is hald, which 
applications can communicate with through D-Bus.  Normally various 
desktop applications take care of communicating with hald on behalf of 
the user regarding mounting removable devices, and can generally be 
configured through whatever means you configure user preferences on 
your destkop environment.  Your desktop applications may or may not be 
pre-configured to mount these devices on your distribution. 

The reason that USB thumb drives behave the way they do with regard to 
permissions is that they are usually formatted as FAT32, and the 
software that mounts them does so using the option uid=(the user's 
UID) so that the user can read and write all the files on it.  For 
example, here's the mtab entry for my Memory Stick Pro, which was 
auto-mounted via the USB card reader in my monitor: 

  /dev/sdc1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500) 

However, the "uid=" option is not available on any of the Linux native 
file systems... it is only available on FAT, NTFS, ADFS, and AFFS. 
So, this method doesn't solve Brendan's problem, unfortunately.  Also 
I explained why setting umask doesn't help in my previous post.  From 
a practical standpoint, I think you're stuck with NTFS or FAT32 if you 
want that behavior. 

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02 
-=-=-=-=- 
This message is posted from an invalid address.  Replying to it will result in 
undeliverable mail due to spam prevention.  Sorry for the inconvenience. 

_______________________________________________ 
Discuss mailing list 
[hidden email] 
http://lists.blu.org/mailman/listinfo/discuss
 


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org