Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why does Lion lock files?

Why does Lion lock files after 2 weeks? What's the point? I suspect it's to do with file synchronization, but can't figure it out...

Posted on Aug 5, 2011 10:03 AM

Reply
41 replies

Jun 19, 2012 3:55 PM in response to Whitecity

Whitecity wrote:


Yes, it is still locking files.

Then you've got an unusual problem. I'd suspect a corrupted preferences file where that setting is kept.


It's not in the Time Machine preferences file, as you'd expect.


I think it's in the /Library/Preferences/com.apple.AppleFileServer.plist (it has a lock_manager boolean, but no setting I can see for the time), but I'm not sure, and I'm not on Lion to test it. You should be able to find it, though, by changing the setting and seeing what preference file gets changed.

Jun 19, 2012 4:43 PM in response to Pondini

Thanks - I don't think that's the problem- as far as I can tell it is only files that I receive by email that are locked. This manifests itself mostly in my networked scanner, which is set to email scanned files to me. The pdfs or tiffs it generates show up in my in-box, and previously I would double click them, check them, then click -'save as'.

Now I have to double click them, unlock them to crop them, since they are always locked, make my adjustments, then duplicate the file, close the original, then click save. It's a major step backwards in usability.

Lion has stopped locking files itself as far as I can tell.

Jun 19, 2012 9:51 PM in response to Pondini

Sorry - I'm not being clear - the problem shows up in Preview - which is an app that uses autosave and versions - but as far as I can see only happens with attachments opened by double clicking on them in Mail (I have not tried other apps). If I save the attachment, then open it, the file is not locked.

I think opening another thread might be a good idea.

Jun 20, 2012 6:38 AM in response to Whitecity

Whitecity wrote:


Sorry - I'm not being clear - the problem shows up in Preview - which is an app that uses autosave and versions - but as far as I can see only happens with attachments opened by double clicking on them in Mail (I have not tried other apps). If I save the attachment, then open it, the file is not locked.

Yes, I know. But from what you've detailed, this doesn't sound like a prolbme with Lion's normal file-locking mechanism:


  • You have it turned off.
  • Other kinds of files aren't being locked.
  • The locking of the attachments is immediate, not after some period of inactivity.
  • They're locked only when you open them in Mail.

Jun 20, 2012 8:15 AM in response to Pondini

Yes, it sounds like it could be a bug, but I don't know enough about how locking works to even start to know where it is. Since turning off locking doesn't seem to tell the computer to just ignore the idea of locking, but rather not to lock any new files, it seems like perhaps Mail is not getting the memo not to lock anything, and is passing the message that the files are locked when they are passed to preview, but that's a shot in the dark.

It would be another good reason to be able to completely turn locking off, rather than the rather half-hearted way that we have.
Thanks for your help.

Jun 20, 2012 9:16 AM in response to Whitecity

Locking is done by setting a bit on individual files (do Get Info on any file -- you'll see a locked box, usuallly not checked). This is not new, and files are not locked by default, whether on Lion or earlier.


Various apps may lock files under certain circumstances -- that's not real common, but it's been around for quite a while, too, not new to Lion. Time Machine locks some files in it's backups, for example.


The new feature in Lion is the option to have files used by apps that support AutoSave and Versions to be locked after a period of inactivity. There's never been any immediate locking, even in the beta versions.


What you have is very different, apparently limited to Mail. Whatever it is doesn't seem related to the option to lock files after a period of inactivity, and I've not seen it reported here (or during beta testing).


Hopefully you'll get some response to your other thread. If not, you might try the usual things of installing the "combo" update, per Installing the ''combo'' update and/or Reinstalling OSX. If that doesn't help, installing a fresh version of OSX (that won't disturb anything else), per the same article, might help.


If you're covered by AppleCare, call them.


If not, file a Bug Report with Apple. See Reporting a Problem to Apple.

Jul 8, 2012 4:57 PM in response to Whitecity

This is a royal pain. I'm a developer, and I just wasted another hour because of stupid Lion features. I have images (.png) files that I alter and add elements to, and dealing with unexpected locks is a bother. This is almost as dumb as Apple hiding "Library Folders". I had to unhide this, especially since Apple places all of its Developer Simulators in Library folders... see really frustrating... Please don't become like Microsoft where they always think they know whats best for all situations!!

Why does Lion lock files?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.