Correct settings for wide symlinks on samba shares on OMV 8

  • I am trying to use symlinks in a SMB share on OMV 8.

    What I did so far (not mentioning the steps to share SMB folder)

    1. create a symlink to a folder outside the current SMB shared folder somewhere in the SMB share:

    Code
    cd /srv/dev-disk-by-uuid-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/
    ln -s /var/www/html html
    ls -la html
    lrwxrwxrwx 1 root users 14 Jan 21 10:18 html -> /var/www/html/

    2. in the OMV web interface, for the respective share I enabled both

    Code
    Follow symlinks
    Wide links

    3. save and apply

    4. access smb share from a PC (windows for example)

    - here the symlinks are not even visible in the share

    5. check /etc/samba/smb.conf and here I can find these:

    in Global:

    Code
    unix extensions = yes
    allow insecure wide links = yes

    in the respective share settings

    Code
    follow symlinks = yes
    wide links = yes


    Then I manually changed only this in the Global section of /etc/samba/smb.conf

    Code
    unix extensions = no

    and manually restarted smbd service, and now, the symlink appeared in the share and I was able to access the contents.

    unfortunately, after changing anything in the web interface of smb server, this is overridden to the initial value (yes) by OMV and after applying the changes, the symlink is no longer visible in SMB share.


    how can I enable symlinks in SMB server?

  • jgyprime

    Added the Label OMV 8.x
    • New
    • Official Post

    how can I enable symlinks in SMB server?

    Why are you sharing omv's html directory via samba? This is not a great idea. If you must use OMV's nginx instance, you should create another location in /etc/nginx/openmediavault-webgui.d//etc/nginx/openmediavault-webgui.d/

    omv 8.0.10-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.5 | compose 8.1.3 | cterm 8.0 | borgbackup 8.1.3 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    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!

  • Why are you sharing omv's html directory via samba? This is not a great idea. If you must use OMV's nginx instance, you should create another location in /etc/nginx/openmediavault-webgui.d//etc/nginx/openmediavault-webgui.d/

    Let's not think about that specific folder, it was only as an example for testing purposes.


    The files that I want to make available in the SMB share are files in several places from disks that are not shared at all and I do not want to share the entire disk or entire the folders on it, I only want to share specific files or directories that are in different parent locations and have them visible in the same samba share. I do not want to move / copy data to the SMB share.

    I assumed that enabling

    Quote

    Follow symlinks

    Wide links

    should be enough, but it doesn't work without manually disabling "unix extensions" in smb.conf

    I am not sure what else I need to enable in SMB server / shares to be able to see whatever I linked in the SMB share.


    Hello,

    Have you try to use the omv plugin symlinks?

    not yet.

    but the symlinks that I want to have visible in the SMB share are pointing to disks that are not shared at all.

    I will give it a try.

    • New
    • Official Post

    The files that I want to make available in the SMB share are files in several places from disks that are not shared at all and I do not want to share the entire disk or entire the folders on it, I only want to share specific files or directories that are in different parent locations and have them visible in the same samba share. I do not want to move / copy data to the SMB share.

    I assumed that enabling

    Since you can create a shared folder to any path (literally any path if the sharerootfs plugin is installed), why not use shared folders and not use symlinks?

    omv 8.0.10-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.5 | compose 8.1.3 | cterm 8.0 | borgbackup 8.1.3 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    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!

  • Since you can create a shared folder to any path (literally any path if the sharerootfs plugin is installed), why not use shared folders and not use symlinks?

    main problem is that the folders / files I am linking to are spread in a lot of places (disks, subfolders, etc).

    my small kids will access those folders and I do not want to move them somewhere else because the data is replicated (for backup purposes) identically in 2 disks that are located outside of OMV (one of them is in another location). I also do not want them to have access where they do not really need, so this is the main reason I would like to have a shared folder for them and in that shared folder, to have symlinks to files and folders that they need and nothing else.





    I have an UPDATE:

    it seems that absolute path symlinks work correctly.

    but when links point to something that is a relative path to symlink folder, it does not work.



    I will mark this thread as resolved.

  • jgyprime

    Added the Label resolved

Participate now!

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