I configured a server/Plex media server on Ubuntu 20.04, and to transfer and download files directly, I set up Samba shares using the following tutorial, which was working perfectly.

I added an additional hard drive to expand storage to the PC and read multiple ways on how to mount or add it to Samba for it to be accessible; however, none of them have worked, with the two most popular being:

  • Mount it to an existing directory that is already shared with Samba:
    It worked on the Linux machine, however Windows only recognized it as the original drive and not the new one.
  • Mount it in a new directory and add a new share within smb.conf:
      path = /media/Storage
      writeable = yes
      valid users = %S

Am I doing something wrong, or is there a different way to do this?

  • Original smb.conf:
      workgroup = WORKGROUP
      server string = %h server (Samba, Ubuntu)
      log file = /var/log/samba/log.%m
      max log size = 1000
      logging = file
      panic action = /usr/share/samba/panic-action %d
      server role = standalone server
      obey pam restrictions = yes
      unix password sync = yes
      passwd program = /usr/bin/passwd %u
      passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
      pam password change = yes
      map to guest = bad user
      usershare allow guests = yes
      comment = All Printers
      browseable = no
      path = /var/spool/samba
      printable = yes
      guest ok = no
      read only = yes
      create mask = 0700
      comment = Printer Drivers
      path = /var/lib/samba/printers
      browseable = yes
      read only = yes
      guest ok = no
      comment = Home Directories
      browseable = yes
      read only = no
      create mask = 0700
      directory mask = 0700
      valid users = %S
      comment = public anonymous access
      path = /var/samba/
      browsable =yes
      create mask = 0660
      directory mask = 0771
      writable = yes
      guest ok = yes
  • 1
    I don't have an answer to your question, but your permissions for newly created files within the shares are wrong: create mask should be 2, 4, or 6 (6 is recommended for Windows shares), but never 7, unless all new files created are intended to be executables. – JW0914 May 22 at 13:09

Your Answer

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

Browse other questions tagged or ask your own question.