Page 1 of 1

Using Hazel with Linux Samba (SMB) shares

PostPosted: Fri Oct 17, 2025 10:08 pm
by ebrodeur
While creating Hazel rules to organize files locally then move them to a Linux server, I kept getting a file permission error from Hazel. I spent a bunch of time looking at Linux file permissions, owners, etc but that wasn't the issue because the error persisted.

Performing the file copy in Terminal provided a clue to fix it when it gave the error "unable to copy extended attributes."

I needed to update my server Samba configuration to support extended attributes. This is something I had done for my Unraid servers, however this server was stock Debian and I hadn't remembered to configure it similarly. I followed the latest Gemini results and got it working.

Edit /etc/samba/smb.conf

In the [global] section, add the following:
Code: Select all
[global]
    ea support = yes
    min protocol = SMB2

Wherever your share definitions are located, add the following:
Code: Select all
[your_share_name]
    vfs objects = fruit streams_xattr
    fruit:metadata = stream
    fruit:resource = file
    fruit:posix_rename = yes
    fruit:zero_file_id = yes
    fruit:copyfile = yes

My share configuration also includes:
Code: Select all
   veto files = /._*/.DS_Store/
   delete veto files = yes

Restart Samba:
Code: Select all
sudo systemctl restart smbd nmbd

The next time I ran the Hazel rules, the file copy performed without error.

For system context:
    macOS 15.6.1
    Hazel 6.0.4
    Debian 12.11
It would be convenient if Hazel could skip the EA error and continue copying files or provide the specific error message. It took me a few hours to figure it out.

Re: Using Hazel with Linux Samba (SMB) shares

PostPosted: Mon Oct 20, 2025 8:55 am
by Mr_Noodle
You can see errors in the logs as well as the rule status in the UI. Copying without the extended attributes would be considered a failure and some people would not appreciate it silently failing to copy them.