Shares exported with samba 4.19 with `fruit:posix_rename = yes` set do not permit directories to be renamed. With the net/samba416 port, this worked correctly. From a macOS machine that has mounted the share, the following set of commands demonstrates the problem: ``` $ mkdir tmp $ touch tmp/foo $ mv tmp fmp mv: rename tmp to fmp: Operation not supported ``` With Samba 4.16, this worked correctly.
Nice catch! But I found an even simpler failure case: m2 46 % touch frob m2 47 % rm frob rm: frob: Operation not supported Here are a few lines from the samba log: [2024/09/08 14:44:51.134796, 3] ../../source3/smbd/dir.c:803(smbd_dirptr_get_entry) smbd_dirptr_get_entry: mask=[frob] found frob fname=frob (frob) [2024/09/08 14:44:51.134856, 2] ../../source3/lib/adouble.c:2153(ad_read_meta) error reading meta xattr: Operation not supported facl(ACE_GETACLCNT, frob): Function not implemented unix_mode(frob) inherit mode 40755 facl(ACE_GETACLCNT, frob): Function not implemented tester opened file frob read=No write=No (numopen=4) I browsed upstream bug reports but don't see this, maybe it would be a good idea to open one?
I've tested the 4.19.7 -> 4.19.8 update and it provides no improvement to this issue. m2 103 % touch abc m2 104 % rm abc rm: abc: Operation not supported
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=550e0299804acaa7d73f6744c14b0e0f1a598d9c commit 550e0299804acaa7d73f6744c14b0e0f1a598d9c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-10 15:01:20 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-09-10 15:07:16 +0000 Mk/bsd.default-versions.mk: Revert the SAMBA default from 4.19 back to 4.16 This reverts commit 0d1aba712a301ddb1e8b7ccbf3acc721dc3c90e8. A recently reported bug 281360 might suggests that Samba 4.19 does not work with Time Machine and might result in data loss. Let's revert the default version bump for now until we have more time to plan how we are going to deal with issue. A potential solution would be to disable Time Machine support in 4.19 for now. PR: 280769 281360 Reported by: theraven Approved by: samba (0mp) Mk/bsd.default-versions.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
This is terrible. Bouncing everyone's default versions willy-nilly back and forth because two people have problem with their corner case. You could have set lower default versions in make.conf for yourselves.
(In reply to Marko Cupać from comment #4) Do you have evidence that only two people had problems? The latest issue of the FreeBSD Journal had an article that described how to set up Samba with *precisely* the affected use case, so I would strongly suspect that it's more than two people. As far as I am aware `make.conf` is not read by `pkg`, so I don't think that's a helpful suggestion. Do you have constructive suggestions or did you just come here to add noise and insult people?
(In reply to Marko Cupać from comment #4) I did what I deemed necessary to avoid data loss for the users who use FreeBSD as a reliable storage for their Time Machine backups. As far as I know, this is the standard procedure for rolling back updates to DEFAULT_VERSION which turn out to need more baking time (e.g., a78ac4eb9990a0c44bf11bdb522cbe7a3bf3ad45). If you believe that 4.19 is ready to be the default version, please post your testing results to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280769. Extra data points from the community let us have more confidence in the updates when we commit them.
Guys, thanks for maintaining samba on FreeBSD. I got much more from it than I paid for. However, I think this unpleasant situation could have been avoided with a little more internal testing before commiting to HEAD. Best regards,
Any chance the update of samba419 to 4.19.9 solves this? I'm not in a position to test the new version until tomorrow. https://cgit.freebsd.org/ports/commit/?id=f8c19ed2ce9ab4d724a3309fc6ed4cdf78b10716
(In reply to Craig Leres from comment #8) Survey says not: m2 3 % cd /Volumes/Time\ Machine/ m2 12 % touch adf m2 13 % ls -l total 17 -rw-r--r-- 1 leres staff 0 Oct 23 11:05 adf drwxr-xr-x 1 leres staff 16384 Oct 23 10:15 m2.sparsebundle m2 14 % rm adf rm: adf: Operation not supported I'm going to file a bugzilla.samba.org issue (but the procedure for getting an account there is quite baroque so I'm slogging through that process...)
Upstream bug report submitted: https://bugzilla.samba.org/show_bug.cgi?id=15744
Probably fixed with this commit: https://cgit.FreeBSD.org/ports/commit/?id=24fbb52094816ac737d04a668f32dbaf471b41e8
(In reply to Vladimir Druzenko from comment #11) Can confirm! Both the quick test and an actual backup. 14.2/amd64 vs. 15.2-Sequoia/M4. m4 10 # cd /Volumes/com.apple.TimeMachine.localsnapshots m4 11 # ls -lts total 0 0 drwxr-xr-x 3 root wheel 96 Jan 12 21:48 Backups.backupdb m4 12 # touch foofof m4 13 # rm foofof m4 14 # ls -tsl total 0 0 drwxr-xr-x 3 root wheel 96 Jan 12 21:48 Backups.backupdb m4 15 #
(I tested with 4.19.9_4)
Close?
(In reply to Vladimir Druzenko from comment #14) Could you confirm that this is not an issue on the current version of 4.20 as well?
(In reply to Mateusz Piotrowski from comment #15) I don't use this feature. I judge by the comments.
(In reply to Vladimir Druzenko from comment #16) I've just tested 4.19 and 4.20. On 4.19, I can complete a Time Machine backup. Yay, thank you everyone who made this work! On 4.20, I can't even connect to the server from macOS, with or without Time Machine. Not sure what's happening there but the 4.20 package seems to be completely broken. Nothing informative in log.smbd.
(In reply to David Chisnall from comment #17) Yes, I'm sorry about the breakage with Samba 4.20. I didn't notice wrong package names in *_DEPENDS during review. A patch for that has landed so 4.20 should be installable soon. Thank you for testing 4.19! I'm closing this ticket. Let's reopen it/open a new one if it's still a problem on 4.20.
(In reply to David Chisnall from comment #17) By coincidence I tried to upgrade from 4.19 to 4.20 yesterday and was also completely unable to connect from my mac.
(In reply to Craig Leres from comment #19) Could it be a different bug?
Seems on net/samba420 that : https://cgit.freebsd.org/ports/commit/?id=24fbb52094816ac737d04a668f32dbaf471b41e8 is not available on this port... Maybe we can try to add this patch into samba 4.20 ?
(In reply to Mateusz Piotrowski from comment #20) Seems like it; with samba420 I can't even get my mac mini to mount the samba volume. When samba419 was broken I could mount and create files (but could not rename them). (In reply to Xavier Beaudouin from comment #21) I think that patch is already in the samba420 port: files/0100-Fix-pathref-handling-for-FreeBSD-13plus_samba42x.patch