Samba mac client and group permissions issue

  • Hello guys,


    I'm having some issues with mac osx client and my OMV samba server.


    When copying a file from mac to omv server, it preserves its own premissions where only the owner can r/w, that means that when another OMV SMB user wants to edit the file, he can't !!


    Exemple:


    --> this is what happens after copying an excel file from mac to a samba share folder on OMV.


    siulman@microserver:/media/Master/Media/LuisPilar$ l
    total 36
    drwxrwxr-x 4 siulman users 4096 Jan 31 11:54 Photos
    drwxrwxr-x 2 siulman users 4096 Jan 31 01:48 Temp
    -rw------- 1 pilar users 25383 Jan 31 14:15 test.xlsx


    --> I have tried to set the "enable permission inheritance" or force the "file and folder creation" to 0775 from Webmin but same issue...


    With Android, Windows and IOS it's ok, the permissions are rewritten to allow user and group


    Anyone can help?

    • Offizieller Beitrag

    Add this line to this file /etc/default/openmediavault


    OMV_SAMBA_UNIXEXTENSIONS="no"


    run /etc/init.d/openmediavault-engined restart


    Go to samba webGUI, make sure permission inheritance is enabled, make a minimal change save and apply (This is equivalent to run omv-mkconf samba && /etc/init.d/samba restart )


    Now in OSX mount again, copy a file check the permissions are more open this time.


  • Hi @subzero79 and thanks for your answer.
    I've tried and still the same:


    siulman@microserver:/media/Master/Media/LuisPilar$ l
    total 36
    drwxrwxr-x 4 siulman users 4096 Jan 31 11:54 Photos
    drwxrwxr-x 2 siulman users 4096 Jan 31 01:48 Temp
    -rw------- 1 siulman users 25372 Feb 1 10:00 test_subzero79.xlsx


    --> permission inheritance is enabled
    --> I even tried to reboot the server


    I created the file on my macbook, then copyed it to the server.



    NOTE:


    siulman@microserver:/media/Master/Media/LuisPilar$ cat /etc/default/openmediavault
    # This file is part of OpenMediaVault.
    #
    # @license http://www.gnu.org/licenses/gpl.html GPL Version 3
    # @author Volker Theile <volker.theile@openmediavault.org>
    # @copyright Copyright (c) 2009-2016 Volker Theile
    #
    # OpenMediaVault is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # any later version.
    #
    # OpenMediaVault is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
    # Default values
    OMV_CONFIG_FILE="/etc/openmediavault/config.xml"
    OMV_CONFIG_TEMPLATE_FILE="/usr/share/openmediavault/templates/config.xml"
    OMV_PRODUCTINFO_FILE="/usr/share/openmediavault/productinfo.xml"
    OMV_SCRIPTS_DIR="/usr/share/openmediavault/scripts"
    OMV_I18N_LOCALE_DIR="/usr/share/openmediavault/locale"
    OMV_MOUNT_DIR="/media"
    OMV_NFSD_EXPORT_DIR="/export"
    OMV_CACHE_DIR="/var/cache/openmediavault"
    OMV_LOG_DIR="/var/log/openmediavault"
    OMV_SSL_CERTIFICATE_DIR="/etc/ssl"
    OMV_SSL_CERTIFICATE_PREFIX="openmediavault-"
    OMV_SSH_KEYS_DIR="/var/lib/openmediavault/ssh/keys"
    OMV_SSH_KEY_PREFIX="openmediavault-"
    OMV_DPKGARCHIVE_DIR="/var/cache/openmediavault/archives"
    OMV_DOCUMENTROOT_DIR="/var/www/openmediavault"
    OMV_CRONSCRIPTS_DIR="/var/lib/openmediavault/cron.d"
    OMV_CONFIGIMPORT_SCRIPTS_DIR="/usr/share/openmediavault/configimport"
    OMV_MKCONF_SCRIPTS_DIR="/usr/share/openmediavault/mkconf"
    OMV_ENGINED_DIR="/usr/share/openmediavault/engined"
    OMV_ENGINED_SO_ADDRESS="/var/lib/openmediavault/engined.sock"
    OMV_ENGINED_SO_SNDTIMEO=10
    OMV_ENGINED_SO_RCVTIMEO=180
    OMV_ENGINED_DIRTY_MODULES_FILE="/var/lib/openmediavault/dirtymodules.json"
    OMV_INITSYSTEM_SCRIPTS_DIR="/usr/share/openmediavault/initsystem"
    OMV_INITSYSTEM_FILE="/var/lib/openmediavault/initsystem.req"
    OMV_USERMGMT_DEFAULT_GROUP="users"
    OMV_RRDGRAPH_DIR="/var/lib/openmediavault/rrd"
    OMV_RRDGRAPH_ERROR_IMAGE="/usr/share/openmediavault/icons/rrd_graph_error_64.png"
    OMV_WEBGUI_FILE_OWNERGROUP_NAME="openmediavault"
    OMV_DEBUG_SCRIPT="NO"
    OMV_DEBUG_PHP="NO"
    OMV_DEBUG_EXTJS="NO"
    OMV_SAMBA_UNIXEXTENSIONS="NO"
    siulman@microserver:/media/Master/Media/LuisPilar$


  • @subzero79 ,


    I tried wth "NO" and "no" and still not working.
    I let "no".


    here the smb.conf:



    siulman@microserver:/media/Master/Media/LuisPilar$ cat /etc/samba/smb.conf
    #======================= Global Settings =======================
    [global]
    workgroup = WORKGROUP
    server string = %h server
    dns proxy = no
    log level = 0
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog only = yes
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = true
    passdb backend = tdbsam
    obey pam restrictions = yes
    unix password sync = no
    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
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    guest account = nobody
    load printers = no
    disable spoolss = yes
    printing = bsd
    printcap name = /dev/null
    unix extensions = yes
    wide links = no
    create mask = 0777
    directory mask = 0777
    use sendfile = yes
    aio read size = 16384
    aio write size = 16384
    null passwords = no
    local master = yes
    time server = no
    wins support = no
    #======================= Share Definitions =======================
    [Media]
    path = /media/97f93447-ec94-467a-821c-9745c9a46684/Media/
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = yes
    ea support = no
    store dos attributes = no
    printable = no
    create mask = 0755
    force create mode = 0644
    directory mask = 0755
    force directory mode = 0755
    hide dot files = yes
    valid users = "pilar","siulman"
    invalid users =
    read list =
    write list = "pilar","siulman"
    [Data]
    path = /media/97f93447-ec94-467a-821c-9745c9a46684/Data/
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    printable = no
    create mask = 0755
    force create mode = 0644
    directory mask = 0755
    force directory mode = 0755
    hide dot files = yes
    valid users = "siulman"
    invalid users =
    read list =
    write list = "siulman"
    siulman@microserver:/media/Master/Media/LuisPilar$


  • There is something you're doing wrong. After you add the value you need to restart engined, then run omv-mkconf samba, finally restart samba.


    Working !!!!
    Works perfectly and now other users in the group can edit.



    /etc/init.d/openmediavault-engined restart
    omv-mkconf samba
    service samba restart


    siulman@microserver:/media/Master/Media/LuisPilar$ l
    total 64
    drwxrwxr-x 4 siulman users 4096 Jan 31 11:54 Photos
    -rwxrw-r-- 1 siulman users 24928 Feb 1 12:40 Subzero new.docx
    -rwxrw-r-- 1 siulman users 25635 Feb 1 12:40 subzeroNewExcell.xlsx
    drwxrwxr-x 2 siulman users 4096 Jan 31 01:48 Temp


    Could you explain what OMV_SAMBA_UNIXEXTENSIONS="no" does?


    Thanks for your help

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!