DietPi-Sync to Samba symlink failed: operation not supported (95)

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
rucknapucknavitz
Posts: 3
Joined: Sat Nov 24, 2018 4:15 pm

DietPi-Sync to Samba symlink failed: operation not supported (95)

Post by rucknapucknavitz »

Greetings,

I'm trying to run DietPi-Sync from my USB mount to a Samba mount (hosted on another RPi 3 running openmediavault), but the symlinks all fail with "Operation not supported (95)"

Here's the setup:
Source location: /mnt/USB_80GB (all my user data is stored here)
Target location: /mnt/OMV_DietPi_UserData/dietpi-sync (samba share)


Here are some of the error messages:

Code: Select all

rsync: symlink "/mnt/OMV_DietPi_UserData/dietpi-sync/dietpi-backup/data/lib/arm-linux-gnueabihf/libutil.so.1" -> "libutil-2.24.so" failed: Operation not supported (95)
rsync: symlink "/mnt/OMV_DietPi_UserData/dietpi-sync/dietpi-backup/data/lib/arm-linux-gnueabihf/libuuid.so.1" -> "libuuid.so.1.3.0" failed: Operation not supported (95)
rsync: symlink "/mnt/OMV_DietPi_UserData/dietpi-sync/dietpi-backup/data/lib/arm-linux-gnueabihf/libwrap.so.0" -> "libwrap.so.0.7.6" failed: Operation not supported (95)
Does anyone have any thoughts? I'd like to be able to sync my USB drive to a Samba share on my NAS for redundancy.

Thanks!
User avatar
MichaIng
Site Admin
Posts: 2262
Joined: Sat Nov 18, 2017 6:21 pm

Re: DietPi-Sync to Samba symlink failed: operation not supported (95)

Post by MichaIng »

Seems like symlinks are not allowed on samba mounts. Checked and found verification on web search. It's due to security concerns. E.g. users can get access to sensible system files by creating a symlink on the client that points to the desired sensible system file. And on samba, unix permissions are not ported that would prevent this.

But symlinks can be enabled by this settings in smb.conf:

Code: Select all

follow symlinks = yes
wide links = yes
unix extensions = no
Perhaps "wide links" is not required if it's just about symlinks within the samba share dir. Did not test further for now.
The "unix extendions" seems to be required "no" to allow symlinks at all. Perhaps default smb.conf / man give some hints.
rucknapucknavitz
Posts: 3
Joined: Sat Nov 24, 2018 4:15 pm

Re: DietPi-Sync to Samba symlink failed: operation not supported (95)

Post by rucknapucknavitz »

Seems like symlinks are not allowed on samba mounts.
Ah, yes, I see that. Thank you for running that down. I tried the following...

Code: Select all

follow symlinks = yes
wide links = yes
unix extensions = no
...in various combination, both for the server and the specific share, but without success.

So I abandoned Samba for NFS.

For anyone who stumbles upon this, you'll need to enable no_root_squash in the extra options for the share in OpenMediaVault (or whatever you're using) to not run into a chown issue.

Also, inside DietPi I had to edit /etc/fstab from the version Drive Manager created:

Code: Select all

192.168.1.xxx:/ /mnt/nfs_dietpi nfs auto,_netdev,nofail 0 0
to:

Code: Select all

192.168.1.xxx:/export/dietpi /mnt/nfs_dietpi nfs auto,_netdev,nofail 0 0
in order to get it to properly map my share.
User avatar
MichaIng
Site Admin
Posts: 2262
Joined: Sat Nov 18, 2017 6:21 pm

Re: DietPi-Sync to Samba symlink failed: operation not supported (95)

Post by MichaIng »

About fstab entry:
- Hmm if I remember right, NFS4 requires the entry to be just 192.168.1.xxx:/, while NFS3 and lower requires it to be 192.168.1.xxx:/path/to/share.
- We added an auto detection for this some versions ago. Did you run dietpi-drive_manager from latest DietPi version?
rucknapucknavitz
Posts: 3
Joined: Sat Nov 24, 2018 4:15 pm

Re: DietPi-Sync to Samba symlink failed: operation not supported (95)

Post by rucknapucknavitz »

You're correct... it did pick up the NFS4 share just by using xxx:/, however, it added two shares:
1. 192.168.1.xxx:/ /mnt/[I don't recall] (that mapped to my SD card)
2. 192.168.1.xxx:/export/dietpi /mnt/nfs_dietpi (correctly mapped to the network drive)

In order to get just the one share to mount (correctly to the network drive), I had to manually edit the fstab
Post Reply