Samba sharing a FAT32 external HD

ZIYAD A. M. AL-BATLY zamb at saudi.net.sa
Sat Jun 18 14:26:51 UTC 2005


On Fri, 2005-06-17 at 21:29 -0400, Ben Novack wrote:
> On 6/17/05, Ben Novack <bennovack at gmail.com> wrote:
> > I've got an external USB2 hard drive formatted as FAT32 that contains,
> > among other things, all of my music; I want the other systems on my
> > network (specifically, a Mac PowerBook) to have unrestricted
> > read/write access to it. Sharing my home directory works fine; the
> > external drive shows up when browsing the network, but neither XP nor
> > the PB can actually view it. Is there a way to get it properly shared
> > without reformatting it into something more Unixy - something I very
> > much want to avoid, since I frequently use it on XP systems?
> > 
> > (The HD's plugged into a Hoary desktop, for the record.)
> 
> Something else that just came up as I was investigating a workaround:
> If I copy the library to the shared folder on my hard drive, the Mac
> can't use it as its library folder because it lacks write permissions.
> Is there a way I can change its contents, recursively down the tree,
> to be rwx for everyone?
> 
To change the permission recursively pass the “-R” option to
“chmod” (bare the security risk!  Everyone will have read/write
permissions):
  chmod -R a+rwX /path/to/directory


And about your original problem, to fix it you need to mount your drive
with the “dmask=000,fmask=111” options.  In “/etc/fstab” add the line:
  /dev/sda1  /media/sda1  auto  defaults,noauto,users,dmask=000,fmask=111

(In the above, I'm assuming that your USB HDD is “/dev/sda” and it has
only one partition.  Create the directory “/media/sda1” if needed.
Configure SAMBA to share “/media/sda1”.  Again: Bare the security risks
imposed by such actions!).

If you need anything else, just ask here again.
Ziyad.




More information about the ubuntu-users mailing list