Handling common errors with the Samba file server

convert ISO to utf8

  • Stop the samba service:

    systemctl stop smb
    
  • Install the module convmv:

    # RedHat8 and derived distributions
    yum install convmv
    # Debian
    apt-get install convmv
    
  • In a command prompt, run the conversion command on the shared directory. Here in our example, the root directory is named data:

    convmv --notest -f iso-8859-15 -t utf8 -r /data
    
  • Then in /etc/smb.conf, delete or comment the line dos charset:

  • Finally, restart Samba:

    systemctl restart smb
    systemctl restart winbind
    systemctl restart nmb #<== Necessary if NetBIOS is enabled.