Home
Posted By: kevs File Sharing, file is locked cannot save - 09/18/11 04:18 PM
An intern was working on a excel file the other day, she saved, closed, and quit, and left the building, yet Apple says the file lock is locked by her and of course, I have to do a save as, another head wringer. thanks!
Posted By: tacit Re: File Sharing, file is locked cannot save - 09/18/11 09:40 PM
Are you sure she quit before she disconnected from the network? This will sometimes happen if you open a file across the network, save, disconnect from the network, and then quit. Since the network is disconnected, when you quit the application, it can't update the file lock on the network.

Usually, restarting the network server will fix this.
Posted By: kevs Re: File Sharing, file is locked cannot save - 09/18/11 10:23 PM
Tacit, thanks!, no I'm not sure. I'll make a note cool.

What do you mean by restarting the network server? It's must my imac to her laptop. I think I rebooted the imac and it still was locked.
The server is the computer the file is located on. It is "serving" as a file storage device.
Posted By: kevs Re: File Sharing, file is locked cannot save - 09/19/11 01:51 AM
Joe, thanks!
So what should unlock this? A reboot of the computer? something else?
Originally Posted By: tacit
Usually, restarting the network server will fix this. (Emphasis added)

Just to cover all bases, try shutting down and restarting your iMac.

Edit: You could have shut down and restarted in less time than it took to post the question.
Simply logging out of a user account and then logging back in will sometimes clear the problem and is the quickest fix. However, a reboot does the same thing and more although it takes more time.
Posted By: kevs Re: File Sharing, file is locked cannot save - 09/19/11 03:14 PM
JOe, did log out, reboot and the shutdown, and the file is still locked. thanks.
copy the file to a flash drive and try to open it on another computer. If it still refuses to open, the file has a lock bit set inside the document, by the application that was editing it (excel) and has nothing to do with the fileserver or filesharing.
Posted By: kevs Re: File Sharing, file is locked cannot save - 09/20/11 12:07 AM
V, my guess is you 2nd idea is correct. Then what can I do?
It's my file, my computer. I don't get it.
I did command i, all read write.
Posted By: kevs Re: File Sharing, file is locked cannot save - 09/20/11 12:07 AM
PS, and doing a save as to a new name does not work!
Posted By: kevs Re: File Sharing, file is locked cannot save - 09/20/11 12:14 AM
NEW NEWS
In fact it does open on on another computer.
In fact in opens ok, if I copy it to the desktop!

But if I delete the file from the folder I usually keep it and and drag the one on the desktop that is opening ok back to the normal folder I keep my list in, then it's locked again (read only).

This is still a problem because this is the folder I like to keep these list.
The folder is read/write as are the parent folders. So I'm still puzzled.
The lock message still has the fill name of the intern in the lock message.

Try booting from your install disk and navigating to "Utilities," where, if I remember correctly, you'll find an option to repair your home folder permissions, again, if I remember correctly, included in the change-password drop-down.
This isn't a permissions problem. Excel is recording the paths to files that are being edited (and therefore "locked"). You have to find that file and delete it.

(It's possible that instead of storing a list of paths, all in one file, it's instead creating a "lock" file alongside the file it thinks is in use. Same concept: find the lock file and delete it.)

I don't have Excel (nor any other Microsoft product) installed, so I can't look to see which method it uses. I'd first look for invisible files in the same folder as the "locked" file, paying close attention to files with similar names. Failing to find any of those, I'd use defaults read to look in Excel's preference file to see if it's keeping a locked file list in there.
A post on Microsoft Answers suggests that the following procedure should work. (Untested)

Open Terminal, and type:
fyle=
Do not type anything after the =; no spaces, no return character, nada.
Drag the "locked" spreadsheet from Finder into the Terminal window. The line should read something like: fyle=/Users/... , with still no spaces around the =.
Press return
Enter the following command, this time pressing return at the end:

rm -f "$(dirname "$fyle")/~\$$(basename "$fyle")"

Thanks for explaining what's really going on here.
© FineTunedMac