It would be nice if.......

    • OMV 2.x
    • It would be nice if.......

      I have made manual by hand edits of /etc/samba/smb.conf because the types of shares I wish to offer can not be created in the OMV Services | SMB/CIFS module.

      It would be nice if I could do the types of things I need via the OMV module, but what really gets my goat is that once I have made changes by hand, going back and using the module for other reasons does not preserve those manually made by hand changes. smb.conf is rewritten to reflect only what the module shows and allows. Basically, this eliminates all possible future use of the module by me.

      Can this be fixed?
      --
      Google is your friend and Bob's your uncle!

      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • Add your changes to extra options boxes or create your own module in /usr/share/openmediavault/mkconf/samba.d/
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      Add your changes to extra options boxes


      This does not fully work. Some of the things I add to the extra options box do appear in smb.conf, but others do not.

      What I am trying to add is a share for a chroot'd user who has a folder in /home. It works fine if I enter it by hand into smb.conf, but placing it into the extra options box and saving doesn't get it into the smb.conf file.

      This user's files also do not appear in the homes share if enabled.
      --
      Google is your friend and Bob's your uncle!

      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • What exactly are you putting in the extra options box that doesn't appear? I have never seen that.

      Did you enable the homes share under the Settings tab of Users in Access Rights Management along with user homes in Samba?

      The module option will definitely fix all issues though. What are using a chroot'd user for? Might be easier to just use docker.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I have three users with folders in /home which is on the system drive.

      /home/fred
      /home/sftp
      /home/extplorer

      The chroot'd user sftp is for chroot'd sftp service.

      Settings in Access Rights Management does not allow the system drive to be selected, only data drive volumes can be selected.

      Here is exactly what I am adding, the stuff for [root] is accepted, the stuff for [sftp] is not.

      [root]
      guest ok = yes
      writable = yes
      public = yes
      path = /
      force user = root

      [sftp]
      read list =
      write list =
      force directory mode = 0755
      store dos attributes = no
      guest ok = no
      create mask = 0755
      hide dot files = yes
      ea support = no
      inherit acls = yes
      writable = yes
      inherit permissions = no
      printable = no
      invalid users =
      path = /home/sftp
      force create mode = 0644
      comment = sftp on omv
      directory mask = 0755
      valid users =
      --
      Google is your friend and Bob's your uncle!

      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • Just one note... I would never ever share root (/) over samba ESPECIALLY when forcing the user as root and setting guest ok!!!!!

      For the other part, just do the following

      nano /usr/share/openmediavault/mkconf/samba.d/21chrootsftp

      Then put the following code in:

      Shell-Script

      1. #!/bin/sh
      2. set -e
      3. . /etc/default/openmediavault
      4. . /usr/share/openmediavault/scripts/helper-functions
      5. OMV_SAMBA_CONFIG=${OMV_SAMBA_CONFIG:-"/etc/samba/smb.conf"}
      6. cat <<EOF >> ${OMV_SAMBA_CONFIG}
      7. #======================= chroot settings =======================
      8. [sftp]
      9. read list =
      10. write list =
      11. force directory mode = 0755
      12. store dos attributes = no
      13. guest ok = no
      14. create mask = 0755
      15. hide dot files = yes
      16. ea support = no
      17. inherit acls = yes
      18. writable = yes
      19. inherit permissions = no
      20. printable = no
      21. invalid users =
      22. path = /home/sftp
      23. force create mode = 0644
      24. comment = sftp on omv
      25. directory mask = 0755
      26. valid users =
      27. EOF
      Display All


      omv-mkconf samba should show the code you want now. Any change to samba from the web interface will write it too. It will also survive upgrades.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!