[OS X TeX] All TeX files are locked!

André Bellaïche abellaic at math.jussieu.fr
Wed Jul 29 21:30:30 EDT 2009

Le 30 juil. 09 à 02:56, Richard Koch a écrit :

> Andre,
> Your problem with locked files is similar to, though not quite  
> identical with, a system bug I ran into in with TeXShop in late  
> 2007. In my case, I'd try to Save a file previously opened, and the  
> system would put up a dialog saying "The file myfile.tex could not  
> be saved." But I could do a "Save As," saving with a new name. The  
> new file would then work fine.
> Could that be your case. The key experiment is to "save as" and  
> assign a new file name and then see if the new file can be opened,  
> saved, etc., without problems.

This works. The only forbidden action seems to be overwriting.
> There is a way to test a file that is bad in this way. In Terminal,  
> type
>     xattr -l myfile.tex
> where that is an "el", not a "1". If the output has the form
>     ** ** ** ** ** ** ** ** 04 ** ...
> where the ** could be arbitrary and the key digit is the 04, then  
> you might have the same problem.

I have tried with a bad file. I got

new-host:BERGER 7.6 andre$ xattr -l BERGER.7.6.tex
0000   54 45 58 54 54 65 58 73 00 0C 00 00 00 00 00 00     
0010   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00    ................

> I don't know what program writes that bad 04. It isn't TeXShop. If  
> tons of your old files have this problem, then the trick of opening  
> the file and then saving with a different name won't do you much good.

The file I have modified and overwritten using pico (advice by Alan  
Litchfield and David Watson) still have two different "everyone" lines  
in its Get Info/Sharing and Permissions windows. See image in a  
preceding post.

But now, it is willing to be modified and overwritten by TeXShop. No  
more "locked file" or "cannot be saved in this directory".

Maybe the strange aspect of Sharing and Permissions, and the  
forbidding of overwriting are two differents problems (I mean same  
origin, but different solutions).

> This system has been fixed in an upcoming Apple system.

I have tons of file, but not so many after all, if I decide to leave  
the older versions locked as they are now. Better to wait the new  
system than writing a shell script program to open all the files, and  
save them under a new name. It would work, by the way, as a solution  
for the second problem. But the first one (strange Sharing and  
Permissions) remains puzzling.

Thank you all for your help,

It's very late in Paris, and I'll go to bed.


> Dick Koch
> PS: But if you get the message "The file myfile.tex is locked;  
> overwrite it anyway?" then maybe you have a different problem.
> On Jul 29, 2009, at 3:42 PM, André Bellaïche wrote:
>> Dear all,
>> I need help for some other trouble. From this afternoon on, I  
>> cannot modify a TeX file (TeXShop) any more. When I want to save  
>> the file, I get a first message (in French) saying:
>> The file "F.tex" is locked. Do you want to overwrite it anyway?
>> When i say "yes", I get a second message, saying:
>> You do not have permission to save "F.tex" in the directory "so and  
>> so".
>> However, I can save a copy under a new name.
>> What puzzles me is that happens with all TeX files from different  
>> users on my Imac, but not with Excel, Word or Adobe Illustrator  
>> files.
>> Any idea?
>> André
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the MacOSX-TeX mailing list