[OS X TeX] Error: I can't write on file '(name)'

Alain Schremmer schremmer.alain at gmail.com
Mon Mar 26 18:51:41 CEST 2007

Since I had a working installation on my portable, I decided it was  
safe to install Tiger on my desktop. But since I did a clean install,  
this turned out into a nightmare from which I still have not entirely  
recovered. (e.g. I had assumed that the new keychain access app would  
open the old keychain but it took my unix friend—totally unfamiliar  
with the Mac though—almost an hour to let it do it!)

The part of the nightmare that is relevant here is that after I  
installed TeXShop & full gwTeX (this time I wanted the  
documentation), it wouldn't work until I created

Users > juju gpadnom > Library > texmf > tex > latex

(For those curious about my new name, I just got annoyed at Apple  
wanting me to give them my whole ID.)

and placed a copy of my old pdfsync.sty therein. By the way, while  
TeXShop's Basic Help says:

	This feature requires that files named "pdfsync.sty," [...] be  
installed in TeXLive. These files are automatically installed by the  
MacTeX packages. If you obtained TeX another way, find these files in  
the TeXShop distribution

there were no such files in texshop.dmg. (Hence my use of the old  

After I used my old pdfsync.sty, though, I ran again into the

	Error: I can't write on file '(name)'

problem and, again, I was not able to apply Voisin's suggestion:  
After I entered

	sudo pico /usr/local/texlive/2007/texmf/web2c/texmf.cnf

and got the reverse video and hit Control R, I got more reverse video  

	File to insert [from ./] :

so, not knowing what I was doing, I bailed out rather than risk  
creating havoc in the installation.

I then thought I would try Dyballa's. For what happened, see below.

On Mar 23, 2007, at 5:35 AM, Peter Dyballa wrote:

> Am 23.03.2007 um 05:40 schrieb Alain Schremmer:
>> (2) As it happens, a friend came for dinner whose second language  
>> is Unix. Before I could blink, he had carried out Voisin'  
>> suggestion, i.e. added openout_any = r at the end of the file and  
>> it works.
> Is this really the only case of an openout statement? Now that  
> you're no UNIX virgin anymore you could check this in Terminal with
> 	grep -n openout /usr/local/gwTeX/texmf.cnf /usr/local/gwTeX/texmf/ 
> web2c/texmf.cnf

I did that and got

	/usr/local/gwTeX/texmf/web2c/texmf.cnf:382:% Allow TeX \openin,  
\openout, or \input on filenames starting with `.'
	/usr/local/gwTeX/texmf/web2c/texmf.cnf:388:openout_any = p
	juju-gpadnoms-power-mac-g4:~ gpadnom$

> or more precisely
> 	grep -n openout_any /usr/local/gwTeX/texmf.cnf /usr/local/gwTeX/ 
> texmf/web2c/texmf.cnf

I did that and got

	/usr/local/gwTeX/texmf/web2c/texmf.cnf:388:openout_any = p
	juju-gpadnoms-power-mac-g4:~ gpadnom$

> (In both commands grep sees two file names.

  I take it:

> When it finds an occurence,

I take it


> it will also report the name of the file in which it found the  
> search pattern. When only one file name is given, no file name is  
> reported – because it's simple logic that grep can't find the  
> pattern in a file which it does know and since the user and grep  
> know in which file they looked up the pattern it's useless to  
> repeat its name. Sometimes the name counts, for example when find  
> is used to locate some file in some corner of the disk and then  
> grep is used to determine whether a search pattern is contained in  
> any of those files found. In such a case, or out of bigger  
> curiosity, one can give grep a second file name with almost no  
> content, to finish search at once: /dev/null.)
> In case that no texmf.cnf had an openout statement it would have  
> worked to simply add one by
> 	sudo echo "openout_any = r" >> /usr/local/gwTeX/texmf/web2c/texmf.cnf
> The use of ``>>´´ is the important thing: it adds something to the  
> previous contents at its end. If only one angle is used, the old  
> contents is replaced by a new one ...

I do not really understand the responses terminal gave me but I  
assume that it found "openout_any = p" so what I need to do is to  
replace it by "openout_any = r". So, what I should do is

> 	sudo echo "openout_any = r" > /usr/local/gwTeX/texmf/web2c/texmf.cnf

with only one angle?

But, before I do something stupid, I would appreciate confirmation  
that my "understanding" is correct.

Hopeful regards

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/

More information about the macostex-archives mailing list