Is it OK to have samba shares that overlap, like the following:

  path = /mnt/myusbdrive

  path = /mnt/myusbdrive/music

  path = /mnt/myusbdrive/movies

I have a mounted external HDD with music and movies, plus a whole bunch of other stuff like backups. I want to expose the music and movies directories as separate samba shares (probably with guest access), so that they're uncluttered with all the other stuff; and I want to expose the entire drive as a separate samba share (with higher permissions) for doing more administrative things across the drive.

Does Samba behave well with this configuration? I'm wondering if I'd end up with problems like phantom writes if the same file is accessed at the same time across two different shares.

[Edit] Do I need to do anything with oplocks?


  • OS: Debian GNU/Linux wheezy/sid on Raspberry Pi
  • HDD: NTFS, mounted as ntfs-3g.
  • Samba: version 3.6.6

This is a method of operation that native Windows machines have supported since the WinNT days. Samba should have no problems with it.

| improve this answer | |
  • I don't totally understand the reference to Windows as I'm hosting this on Linux. – Toaomalkster Dec 7 '12 at 3:04
  • 1
    @Toaomalkster The point being that the reference system, Windows, that Samba emulates considers this perfectly supported behavior so it is highly likely that Samba considers it fully supported as well. – sysadmin1138 Dec 7 '12 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.