Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

marklemac

macrumors 6502
Original poster
Oct 21, 2003
401
213
Southampton, UK.
Hi there.

Really struggling with this problem, maybe a future OS patch will fix it.

My issue.

3 Macs (all running 12.4), one hosting the files, file sharing on, only one user account on the host Mac. 2 machines that connect use the default account from the main mac when logging in, keeps it simple and technically no permission issues.

If you create a folder from one of the client machines onto the SMB share it works. If the 2nd client mac connects to the SMB share it cannot delete that folder as it says 'it's in use". It's as if the first client Mac has a 'lock' or 'hold' over the folder and won't let go. If the first client Mac disconnects from the SMB share the 2nd Mac can instantly delete the folder.

Now maybe people don't want to delete folders immediately after they have been created and haven't noticed this issue before. There seems to be a 'timer' delay in the SMB, before it lets go of the folder. ?


Anyone else seen this. ?
 

marklemac

macrumors 6502
Original poster
Oct 21, 2003
401
213
Southampton, UK.
Update. If the machine that creates the folder doesn't disconnect from the server the folder still remains tied to that machine. Left it connected for days and no other machine can delete the folder until a disconnect/reboot.
 

hobowankenobi

macrumors 68020
Aug 27, 2015
2,123
935
on the land line mr. smith.
Have not seen this, but does smell of Apple's long history of wonky file sharing. I have seen stuff like this on and off all the way back to the early days of 10.2. With their own version of SMB...hard to say, but you are at their mercy.

Back in the dark days of OS X server, one could only modify permissions successfully on the server, not from the client(s). It would make sense to still do any/all tweaks from the server to reduce variables.

You might try testing shared files from the Users/Shared folder too. In past OSes it had special permissions by default. It may behave differently than folders inside a specific users home directory.


Or...if it is not an SMB file locking issue:

It could be an (invisible) ACL, which the Finder neither shows nor controls. To easily see and test, you might try the free trial of Tinkertool System, which is perhaps the only good GUI tool to see and modify Mac ACLs. Or one can go CLI, but that can be a steep (and dangerous) learning curve to a noobie. The old Server tool had a good permissions tool that managed ACLs...but that ship has sailed.

If it turns out to be an ACL issue, it might be possible to create a specific shared folder, and remove ACLs from that folder (and set inheritance so that all new files created in the folder are ACL free as well). With ACLs removed, then the POSIX permissions are the only control, and the Finder does display and control those fairly well (last time I checked). Have not done any of this for several OSes myself, so can't say if it would be a viable solution in 12.
 
Last edited:

marklemac

macrumors 6502
Original poster
Oct 21, 2003
401
213
Southampton, UK.
I can replicate the problem on any 3 (or more) systems. Even 12.5 Monterey is the same.

If the Mac that creates that folder stays connected and never reboots or drops the connection the lock stays in place. Have seen this for 6 days until I disconnected it. Then the lock gets removed.

Trying to get hold of anyone at Apple to discuss this with is pretty much non existent. I've even used the feedback assistant to log the problem.

The problem is the same with a folder created in the users/shared...

I agree the old server software used to be great. The best version IMO was Appeshare Server v9, the control of permissions was fantastic back then... bring back the classic years, lol.
 
  • Like
Reactions: hobowankenobi

fdw777

macrumors regular
Mar 7, 2012
238
179
Have you tried going to "Go to Folder" and searching for a duplicated folder name?
 

Brian33

macrumors 65816
Apr 30, 2008
1,472
372
USA (Virginia)
Weird problem.

I am able to reproduce it easily. My "server" machine is running High Sierra; both my other machines are running Monterey 12.5.1. The problem apparently only occurs when the object is a folder -- a file got deleted as expected.

From the second machine I used Terminal to issue 'rmdir', and got the result:
rmdir: aa test folder/: Resource busy

Hmmmmm.
EDIT: Interesting that a folder does not get "locked" if the 1st client connects via SMB and uses Terminal commands to create a directory (e.g., 'cd /Volumes/sharepoint; mkdir testdir'). The problem seems to occur only when the folder is created by Finder from the 1st client machine.
 
Last edited:

marklemac

macrumors 6502
Original poster
Oct 21, 2003
401
213
Southampton, UK.
Yep and that “busy” folder will stay that way until the machine that created reboots/force quits finder/or disconnects from the server. It stayed busy for 2 weeks on one machine till I rebooted it.
 

satcomer

Suspended
Feb 19, 2008
9,115
1,977
The Finger Lakes Region
Yep and that “busy” folder will stay that way until the machine that created reboots/force quits finder/or disconnects from the server. It stayed busy for 2 weeks on one machine till I rebooted it.

You should report this to Mac OS Server Feedback because a old friend told me they actually read these reports! I say this because if you and others complain load enough they will fix the problem!
 

marklemac

macrumors 6502
Original poster
Oct 21, 2003
401
213
Southampton, UK.
You should report this to Mac OS Server Feedback because a old friend told me they actually read these reports! I say this because if you and others complain load enough they will fix the problem!

I've done that, let's hope someone does read it.

The whole file sharing thing on a Mac is pretty crap nowadays.. Permisssions are still a complete pain, it's not easy to restrict certain users from seeing certain folders, the best version of Mac Server was back when it was OS 9, the controls over folder etc was simply amazing.

And the other problem I have is if you share an internal hard drive folder over smb it's fine, but if you share an external hard drive that causes a whole load of new issues.
 

hobowankenobi

macrumors 68020
Aug 27, 2015
2,123
935
on the land line mr. smith.
The whole file sharing thing on a Mac is pretty crap nowadays.. Permisssions are still a complete pain, it's not easy to restrict certain users from seeing certain folders, the best version of Mac Server was back when it was OS 9, the controls over folder etc was simply amazing.

And the other problem I have is if you share an internal hard drive folder over smb it's fine, but if you share an external hard drive that causes a whole load of new issues.

Agreed. I switched to Synology years ago...and never looked back.

I Ran Mac servers on every OS since Appleshare IP back in the day. Synology permissions and overall file sharing setup and management, while not perfect...is better by a long shot than OS X ever was.
 
  • Like
Reactions: satcomer

falconneil

macrumors newbie
Nov 28, 2012
5
3
We are seeing the exact same problem too, but over AFP. This only started happening after I upgraded my users to Monterey. Catalina and Big Sur users do not have this issue: it is ONLY those clients that are using Monterey. And funnily enough the issue is fixed in Ventura.
 
  • Like
Reactions: Brian33

marklemac

macrumors 6502
Original poster
Oct 21, 2003
401
213
Southampton, UK.
We are seeing the exact same problem too, but over AFP. This only started happening after I upgraded my users to Monterey. Catalina and Big Sur users do not have this issue: it is ONLY those clients that are using Monterey. And funnily enough the issue is fixed in Ventura.

I haven't tried Ventura yet with this problem but will certainly be giving it a go for sure.
 

deald21

macrumors newbie
Nov 3, 2003
1
1
So glad I found a thread on this. I'm building a Ubuntu 22.04 Server with Samba 4.15.9. I have tried every global config and opened up all security just to get this to work. Yes I know my system is completely different but I feel the issue is the finder.

Windows Machines, and 10.12 Macs are able to create directories without a issue.
But no matter what the Monterey machines create locked folders. If I disconnect the Mac, I'm now able to delete the folder on the other machine. Only new folders are locked. Copied folders and files are fine.

running sudo smbstatus on the server shows the directories as locked files.

marklemac

I'm curious to know if you rename the locked folder are you then able to delete it? Because that works for me. Which is odd cause if the file was truly in use renaming shouldn't be possible.
 
  • Like
Reactions: Brian33

optimusprime-1

macrumors newbie
Jan 12, 2023
1
2
We are facing a similar problem, with Isilon storage giving smb services on the network mounted to mac through smb. when a user create a directory on a smb mount on his mac ( Ventura/Monterey ), other user on other mac can't delete this directory even with full permissions on this directory and parent directory. The strange thing is that I can delete this directory from a windows machine, and vice versa, I can delete the directory from the mac if it has been created on windows machine.
what I've found from my research is that a system service on the mac called Finder 'lock' the directory. After I've killed this process on the mac created the directory, other user from other mac can delete this directory. This is the service that 'lock' the directory -
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
A workaround is just to kill this process and the mac rerun it.
I'm trying to figure why this service 'lock' the smb mount.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.