dperson / samba

Samba docker container
GNU Affero General Public License v3.0
1.52k stars 513 forks source link

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

Open Barsonax opened 3 years ago

Barsonax commented 3 years ago

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?

ddonindia commented 3 years ago

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

Barsonax commented 3 years ago

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:

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

Baitinq commented 3 years ago

Having the same problem here

HansHansen12345 commented 3 years ago

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

joshspicer commented 3 years ago

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

joshspicer commented 3 years ago

btw - removing this seems to fix my scenario too

hulutter commented 3 years ago

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

ddonindia commented 3 years ago

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 commented 3 years ago

Delete is working with alpine edge.

brozikcz commented 1 month ago

Hello guys, do you have any solution for this? The renaming / deleting isn't working when the vfs objects = catia fruit recycle streams_xattr is set.