samba icon indicating copy to clipboard operation
samba copied to clipboard

Cannot delete/rename files due to vfs objects = catia fruit recycle streams_xattr in the smb.conf

Open Barsonax opened this issue 4 years ago • 10 comments

I noticed that I cannot delete or rename files on windows 10 or with the smbclient running inside the container. After some fiddling around with the smb.conf file I saw that when I removed vfs objects = catia fruit recycle streams_xattr that this is working again.

Not exactly sure what this option does but seems to be related to making samba work better with macos?

Barsonax avatar Jan 15 '21 13:01 Barsonax

I am also seeing same issue, I thought my HDD got gone bad 🤣.

ddonindia avatar Jan 19 '21 10:01 ddonindia

Upon closer inspection this line seems to contains multiple space separated options: https://www.samba.org/samba/docs/current/man-html/vfs_catia.8.html https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html https://www.samba.org/samba/docs/current/man-html/vfs_recycle.8.html https://www.samba.org/samba/docs/current/man-html/vfs_streams_xattr.8.html

One of these is probably the culprit but didnt had the time to check them all.

From the sdcard which uses a ext4 filesystem these options seem to work fine. However from the external HDD iam using which uses exfat this does not work.

If it turns out one these options are not compatible with exfat I think there are 2 possible solutions to this:

  • Mention this is the cas in the readme and provide workarounds
  • Don't put these settings by default in the config, personally I would prefer this as that keeps the base image cleaner.

@dperson since you are the author you are probably more fit to make a decision here.

Barsonax avatar Jan 22 '21 09:01 Barsonax

Having the same problem here

Baitinq avatar Jan 22 '21 18:01 Baitinq

i've got the same problem but removing vfs objects = catia fruit recycle streams_xattr is not the solution for me :(

HansHansen12345 avatar Jan 23 '21 15:01 HansHansen12345

I'm seeing this manifest as mv: cannot move 'hi' to 'hi2': Operation not supported

joshspicer avatar Feb 02 '21 22:02 joshspicer

btw - removing this seems to fix my scenario too

joshspicer avatar Feb 05 '21 12:02 joshspicer

The fruit option seem to be the issue. Also found it in this StackExchange Thread: https://unix.stackexchange.com/a/560203

hulutter avatar Mar 08 '21 20:03 hulutter

Still not working. Following are my changes.

diff --git Dockerfile Dockerfile
index d0e1311..948af73 100644
--- Dockerfile
+++ Dockerfile
@@ -33,7 +33,7 @@ RUN apk --no-cache --no-progress upgrade && \
     echo '   strict locking = no' >>$file && \
     echo '   aio read size = 0' >>$file && \
     echo '   aio write size = 0' >>$file && \
-    echo '   vfs objects = catia fruit recycle streams_xattr' >>$file && \
+    echo '   vfs objects = catia recycle streams_xattr' >>$file && \
     echo '   recycle:keeptree = yes' >>$file && \
     echo '   recycle:maxsize = 0' >>$file && \
     echo '   recycle:repository = .deleted' >>$file && \
@@ -48,10 +48,6 @@ RUN apk --no-cache --no-progress upgrade && \
     echo '   server min protocol = SMB2_10' >>$file && \
     echo '' >>$file && \
     echo '   # Time Machine' >>$file && \
-    echo '   fruit:delete_empty_adfiles = yes' >>$file && \
-    echo '   fruit:time machine = yes' >>$file && \
-    echo '   fruit:veto_appledouble = no' >>$file && \
-    echo '   fruit:wipe_intentionally_left_blank_rfork = yes' >>$file && \
     echo '' >>$file && \
     rm -rf /tmp/*

@@ -65,4 +61,4 @@ HEALTHCHECK --interval=60s --timeout=15s \
 VOLUME ["/etc", "/var/cache/samba", "/var/lib/samba", "/var/log/samba",\
             "/run/samba"]

-ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]
\ No newline at end of file
+ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]

ddonindia avatar Mar 22 '21 14:03 ddonindia

Delete is working with alpine edge.

ddonindia avatar Mar 29 '21 22:03 ddonindia