shared folder on the system disk

  • Nope.

    No. If you don't enable home directories Access Rights Management -> User -> Settings, when you enable home directories in samba, it will use whatever the home directory in /etc/passwd is for the user. Just change the home directory there and you should be able to use that location for samba home directory only.

    Hmm but /etc/passwd seems to look ok:

    Code
    stefan:x:1000:100:*my name with spaces in it*:/home/stefan:/bin/bash


    When I enable the samba setting "Enable user home directories", I get the error:
    Which is why I'm asking the question in the first place. :)


    • Official Post

    When I enable the samba setting "Enable user home directories", I get the error:
    Which is why I'm asking the question in the first place.

    This must be a fairly recent change. I have all of my OMV 3.x boxes setup this way. So, enable home directories and enable homes in samba. Then change the home directory for your user in /etc/passwd.

    omv 7.4.10-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.14 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • This must be a fairly recent change. I have all of my OMV 3.x boxes setup this way. So, enable home directories and enable homes in samba. Then change the home directory for your user in /etc/passwd.

    You mean I should move the user directory to its own share on a different disk?


    I wanted to enable home directories in Access Rights Management -> User -> Settings, but /home doesn't show up (because it's not a Shared Folder I guess).




    But I also can't create a Shared Folder /home on the system disk.

    • Official Post

    You mean I should move the user directory to its own share on a different disk?

    Just temporarily. Changing /etc/passwd will move it back to /home/username


    I wanted to enable home directories in Access Rights Management -> User -> Settings, but /home doesn't show up (because it's not a Shared Folder I guess).

    Right. You can't use the system disk. Samba home looks at /etc/passwd but the samba plugin requires home directories to be enabled.

    omv 7.4.10-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.14 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It has been widely discussed if it makes sense at all to partition the OMV systemdisk, but I simply wanted to use the extra space as a "transfer" share to move stuff across or to park data for a moment (a "temp" drive). This worked fine for me:


    1. After OMV install boot the machine with gparted
    2. resize the root partition to 20 GB
    3. create an ext4 partition on the remaining drive space (200 GB in my case)
    4. Boot into OMV
    5. You will find the partition showing up in the web gui
    6. Mount the partition
    7. create a shared folder
    8. Set all permissions as usual
    9. start using the share

    OMV 2.0 on several machines with different configurations

  • well that is not exactly sharing things on "System" disk.
    for me, System disk is the disk(Partition) where the OS is installed.
    as in, not the physical disk but the volume where OS resides.
    but that is semantics :)

    omv 3.0.56 erasmus | 64 bit | 4.7 backport kernel
    SM-SC846(24 bay)| H8DME-2 |2x AMD Opteron Hex Core 2431 @ 2.4Ghz |49GB RAM
    PSU: Silencer 760 Watt ATX Power Supply
    IPMI |3xSAT2-MV8 PCI-X |4 NIC : 2x Realteck + 1 Intel Pro Dual port PCI-e card
    OS on 2×120 SSD in RAID-1 |
    DATA: 3x3T| 4x2T | 2x1T

  • i am also trying to create a share on my system disk (i don't actually want to share anything on that folder but use it for virtualbox images). however I am lost with the UUID part.


    I have create a /OMV-data folder
    then under media i created a dummy UUID 123e4567-e89b-12d3-a456-426655440000 (the post said i can use any UUID i want...)
    then created the symlink, but i cannot see the volume in the 'add shared folder' menu... any suggestions?

    SuperMicro CSE-825, X11SSH-F, Xeon E3-1240v6, 32 GB ECC RAM, LSI 9211-8i HBA controller, 2x 8 TB, 1x 4 TB, 1x3TB, MergerFS+SnapRAID

    Powered by Proxmox VE

  • Hi all


    I am also having a hard time with this.
    I am trying to share a system folder, that is used as a SSHFS mount point for a read only remote file system.
    (My own big-ass server with a 9TB RAID)


    I have only been able to use a folder on the attach USB device, because nothing else is showing up in the create share dialog box.


    I really need to be able to select a local folder for the SSHFS mountpoint, because a USB device is a flimsy and changeable thing.


    I have tried with a /SRV/UUID and /SRV/dev-disk-by-label-LABLE folder as described above in the tread.
    IT NOT WORK ;O(


    I have tried to mount a 100MB file image as a Loop0 device, just to enable a "shareable" local folder. This was not selectable either.


    It really bothers me that its almost impossible to fake a folder/device to be used for such a precise purpose.


    I can not resize and create a partition as suggested.


    I am helping my brother via ssh and he is just running of FITPC2 with 8GB SSD, and he can not to partition the system.


    Can someone please explain how its is possible to make a local folder acceptable under the share dialog box.


    Kind regards


    requa3r0

  • The OMV GUI will not allow selection of anything on the system disk for that purpose. And I believe this was a deliberate design decision that isn't going to be relaxed.


    However, you should be able to remote access the OMV rootfs using sftp or sshfs if you enable root access in OMV's ssh service. Setting up a chroot jail would be sensible because I don't see how you can prevent write access, at least not with sftp using root credentials.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    Edited 2 times, last by gderf ().

  • Thanks for the reply.


    I understand that the OMV will not allow to select system folders as a share pr default, and the reasons for this is obvious.


    But the thread started with a description of a workaround for this exact problem, using GUID folder names under \media..which is now changed to \srv


    I have full root control and access to my brothers FITPC2 running debian 8 and OMV3.


    My own server is a full blown debain 9 with a large RAID on some hardcore server hardware, where i have configured everything by hand. (OEM is much to restrictive for me..and besides i know linux pretty well.)


    The objective is simply to setup a read only sshfs connection from the OMV box to a folder on my server, and for this I need a propper mount point on the system partition, and not a folder on a USB disk!


    The long term plan would properly be to upgrade the FITPC2 with a 64GB SSD and then have a partition for this sort of thing, but until then, I just need a usable workaround!


    The UUID solution described seems obsolete...but there must be a usable workaround to enable the share of a mount point folder!


    Is there really no possible solution to make a local folder selectable under the share dialog box.


    Kind regards


    requa3r0

  • Is there really no possible solution to make a local folder selectable under the share dialog box.


    There is no way to select any folder on the OMV system disk via the OMV GUI. But this in no way prevents configuring things by hand which you say you are able to do. OMV is Debian under the hood. What's the problem with a by hand configuration?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • I could easy set up the sshfs under e.g. /mnt/myserver_sshfs_share, and then share that with both smb and nfs.


    That is what i started with! It works pretty good by the way if you configure it correctly and use a very light chifer!
    We can play 1080p movies with a bitrate of 7000 through the sshfs share on a raspberry pi 3 with openelec (kodi)


    The problem is, if my brother changes anything on the system ...and re-shares another usb disk etc, then both the smb and nfs config will be overwritten by OMV!


    OMV3 is pretty cool, and a super solution for my brother, but using a USB disk as a mount point for a permanently configured sshfs share is not a good idea.


    And changing/editing config files, that are automatically overwritten is not good either.


    When I read the first part of this post, I was hoping to trick the OMV3 with a ninja trick, to share the sshfs properly on a system folder, and still use OMV3 to re-share the folder with smb and nfs.


    I honestly think OMV should consider the option to allow using system folders for the specific case when you need them as mount points.
    Repartition a system to create a specific partition for this purpose is not a trivial thing for most users!


    I also had a look at this:
    https://github.com/OpenMediaVa…penmediavault-remoteshare
    But apparent even this plugin is relying on USB drives for mount points. Or am i mistaking?
    Some discussion about sshfs here as well
    remoteshare Plugin and sshfs


    The last part is pretty interesting..i might have a further look at that.



    The only reason am not just doing the disk partition, is that I am not on location, and can only react the box with ssh.


    Anyway...I guess..ill have to live with the mount point on the USB until I'm going there for a visit, to clone the disk and do some resizing and repartition magic.


    I guess since the post started with a question about "shared folder on the system disk"
    and its not possible any more, the thread could be closed.


    thanks anyway - have a nice Sunday.

  • The problem is, if my brother changes anything on the system ...and re-shares another usb disk etc, then both the smb and nfs config will be overwritten by OMV!

    If you are editing the /etc/samba/smb.conf file by hand, then yes, making changes via the OMV GUI will cause your hand edits to be lost.


    If you want to make edits to the SMB configuration that will stick, then add them to the Advanced Settings | Extra options section. OMV will not touch anything you add there. That's how I samba share out folders on the rootfs.


    I don't use NFS here, so I have no comment about that.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    Edited once, last by gderf ().

  • Thanks..this could be a problem solver for now. One question...see end!


    Just for other readers...if anyone is interested in mounting a sshfs (remote filesystem mounted with a secure shell (ssh) on the OMV box.)


    I mount the sshfs with the following options:


    sshfs -o ro -o Ciphers=arcfour -o Compression=no -o idmap=user -o allow_other -o uid=1000 -o gid=1000 -o IdentityFile=/root/.ssh/id_rsa -o ServerAliveInterval=120 -o auto_cache -o reconnect
    someuser@someserver.com:/media/folder/ /srv/dev-disk-by-label-300GB/FOLDER


    Reason: The Ciphers arcfour will give a smashing speed, and enable direct streaming of high bit-rate video content from the remote linux server.
    All the other stuff is to connect and keep the session alive etc.
    It works rock steady! I have a average copy speed from the sshfs to a usb disk on the OMV arond 3-4MB/s.
    Over the internet - first through fiber 100/100 then cable internet 100/25 (server side upload is 25Mbit).


    A 1080p movie streams with no lags at all!


    About NFS.
    The NFS share is not so important, I'm doing that in /etc/exports..and he will not touch that in OMV. He will only use smb.
    The share is quite specific with a lot of options to work properly anyway, so its more easy to set up directly in /etc/exports.
    For other interested readers. This works to re-share a sshfs using nfs4 and fsid's.


    /srv/dev-disk-by-label-LABEL/FOLDER *(ro,async,fsid=0,crossmnt,no_subtree_check,insecure,anonuid=1000,anongid=1000,all_squash)


    To mount it you must specify ot use NFS4
    NB: fsid=0 means no specified server path!!! There is a devil buried here!


    On some other linux client on the remote location, that will connect to the sshfs mounted on the box, just manually mount with
    (as root or sudo)
    ---------------------------|<Just a space here, no path -- then local mount point>
    mount -t nfs4 server:/ /srv/dev-disk-by-label-LABEL/FOLDER
    or in fstab
    ----------|<Just a space here, no path -- then local mount point>
    server:/ /srv/dev-disk-by-label-LABEL/FOLDER nfs4 ro,async 0 0



    About the samba config.


    Under /etc/samba/smb.conf I have 2 sections


    1:== Global Settings ==


    2:== Share Definitions ==



    I don't quite see where to add any Advanced Settings | Extra options section



    Can you point me the right direction..are you refereeing to a place in the OMV GUI or are are we still in /etc/samba/smb.conf?



    This will be the solution to temporary mount the sshfs to a rootfs folder, and share it with smb outisde OMV



    Thanks a lot.




    requa3r0




    A beginner apparently LOL


  • In the OMV GUI. Services | SMB/CIFS | Advanced Settings | Extra options box - at the very bottom.


    You will have to construct the share by hand and make those entries there.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • gderf Disregard above question


    I figured it out. Although it was not very vell described anyware LOL
    I edited the file:


    /usr/share/openmediavault/mkconf.samba


    Change the end from:
    OMV_SAMBA_EXTENSIONS_DIR=${OMV_SAMBA_EXTENSIONS_DIR:-"${OMV_MKCONF_SCRIPTS_DIR}/samba.d"}
    OMV_SAMBA_CONFIG=${OMV_SAMBA_CONFIG:-"/etc/samba/smb.conf"}
    # Add additional extensions to the configuration file
    cat /dev/null > ${OMV_SAMBA_CONFIG}
    run-parts --exit-on-error ${OMV_SAMBA_EXTENSIONS_DIR}


    added the following lines
    # Add additional extensions to the configuration file
    cat /dev/null > ${OMV_SAMBA_CONFIG}
    run-parts --exit-on-error ${OMV_SAMBA_EXTENSIONS_DIR}
    #added by requa3r0
    cat <<EOF >> ${OMV_SAMBA_CONFIG}
    [somefolder]
    comment = sshfs share
    path = /mnt/somefolder/
    guest ok = no
    read only = yes
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    valid users =
    invalid users =
    read list =
    write list =
    EOF



    Then i did run
    omv-mkconf samba


    checked /etc/samba/smb.conf...all good
    change samba settings in GUI and saved
    checked /etc/samba/smb.conf...still all good


    I guess that is how you do it..or am I all wrong?


    What an up-hill learning session it was today..have an nice Sunday night...(its getting rather late now ;O)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!