Samba shares with designated directories

NethServer Version: 7
Module: samba

Dear all,

If I create a share, the corresponding directory is usually located in /var/lib/nethserver/ibay.
Is it somehow possible to assign a specific directory to a new or existing share. E.G. I would like to share the content of an external HD to the public mounted in


I guess there is no option to do so from the web panel.


First, create the share from UI, then just mount your partition to /var/lib/nethserver/ibay/<name>.


THX… simple idea


sorry for rebound: Is there any pre-mount of /dev/sdx# devices? I can see my USB disk on the backup module, but I can not mount it e.g. to /media/foo. I did not try to mount to /var/lib/nethserver/ibay/ so far, as the simple mount does not work currently.


I’m not sure to understand your request, but the USB disk is mounted by /etc/e-smith/events/actions/mount-usb during the pre-backup-data event.

What is the error?
You can mount almost everything using:

mount /dev/<device_name> /your/path

Thats exaclty the strange part, however I should give some background information:

  • I use Proxmox VE, nethserver 7.5 is installed as a guest.

  • I assigned two USB ports to the VM

  • A WD HDD is attached to host USB 3-2. I use it for backup (since about 3 month)

  • A OCZ SSD is attached to host USB 4-4 (marked red). This is the USB / SSD in doubt:

  • I can see both devices on the nethserver backup interaface, however I did not try OCZ SSD for backup as it does not have enought disk space.

  • lsblk shows the following output.

sda 8:0 0 1T 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 31G 0 part
│ ├─VolGroup-lv_root 253:0 0 1019.8G 0 lvm /
│ └─VolGroup-lv_swap 253:1 0 3.2G 0 lvm [SWAP]
└─sda3 8:3 0 992G 0 part
└─VolGroup-lv_root 253:0 0 1019.8G 0 lvm /
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 1.8T 0 part
sdc 8:32 0 111.8G 0 disk
└─sdc1 8:33 0 111.8G 0 part
sr0 11:0 1 1024M 0 rom

  • So we are talking about sdc1

mount /dev/sdc1 /media/test/
mount: unknown filesystem type ‘ntfs’

  • I already tried to format to (via cfdisk) ext3 (but returned to ntfs)
    the mount error was that the device can only be mounted write proteced


  • maybe I need to take of USB3 support on Proxmox VE first
    Edit: I can remove USB3 support, it seems that his is just the capablity of the HDD.

Thanks for any further ideas

OK here again after cfdisk -> ext4
Please notice: after reboot disk assignment changed from sdc1 to sda 1:

mount /dev/sda1 /media/test/
mount: /dev/sda1 is write-protected, mounting read-only
mount: unknown filesystem type ‘(null)’

It should be a problem with the HD itself or with the USB bus.

Check the logs and see if the disk generates some plug/unplug events.
To use NTFS you need some special tools (, but it’s better to use ext4 or any other native Linux FS (as you already did).

Finally, if the HD is not a real USB disk, attach it to the SATA interface inside the Proxmox machine.

Hi Giacomo,

I am not sure about this: The WD disk @/dev/sdb is a USB device, too. It works perfectly. Additionally, any device I plug into Nethserver VM is write protected - regardless if it is a (virtual) HDD (tried SCSI, SATA, IDE) or a hardware USB device.

Can you help me to unterstand which logs I might check?


Oh … äh …the command

mkfs.ext4 /dev/sdb1

seems to be very helpfull in such cases :man_facepalming::sweat_smile:

I’m glad you fixed it, good job! :wink:

By Change:

We are talking about a 4 TB USB HDD. Do you know how to format such a device in order to take advantage of full capacity? currently I am just limited to 2 TB


Check this out:

Continuo com uma duvida: quando cadastro uma pasta no Nethserver ele cria a mesmo neste diretorio /var/lib/nethserver/ibay/
gostaria de ao criar a pasta no nethserver ele criaria a pasta no seguinte diretorio /mnt/Hd01/

Hi @Borges,

welcome to Nethserver Community. I translated your question:

It can be done at install or with a bind mount, see this thread: