This is the mail archive of the
mailing list for the Cygwin project.
Re: Can't write any dot files from vi
- From: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
- To: luke dot kendall at cisra dot canon dot com dot au,cygwin at cygwin dot com
- Date: Thu, 05 Sep 2002 22:24:06 -0400
- Subject: Re: Can't write any dot files from vi
- References: <20020906014621.9FC725A84@ivory.research.canon.com.au>
At 10:19 PM 9/5/2002, firstname.lastname@example.org wrote:
> Subject: Re: Can't write .profile from vi
>On 6 Sep, I wrote:
> > Thanks for the thought, but of course the :w! doesn't work (that was
> > the first thing I tried), and as I said, I can write other files in my
> > home directory (which is a local directory on the PC, not a network
> > share or anything, BTW). I can also do this:
> > :w xxx
> > :q
> > cp xxx .profile
>Actually, vi won't let me write any existing file whose name starts with
>a ".". The error is always "E212: Can't open file for writing"
>It only affects existing dot files. And yes, I have write permission
>for them all. (I can edit them with vi by writing them to a file ~/xxx
>and copying that over the top of the file.)
>This is on WindowsXP on a FAT32 file system.
>Even stranger, is the fact that I can create new dot files (e.g. .xxx),
>and write them. I can then copy an old dotfile over .xxx and write
>.xxx; and copy .xxx over .xinitrc. But I still can't write .xinitrc
>from inside vi.
>What *does* work is this:
> cp .xinitrc .xxx
> rm .xinitrc
> mv .xxx .xinitrc
>*Then* I can edit .xinitrc and write it.
>The "rm" seemed to have a slightly different noise to other rms; it
>sounded like there was a little more disc access, and it took a
>fraction of a second longer.
>Anyway, I'll wait a couple of days in case anyone would like me to try
>some diagnostics. Failing that, I'll just write a script that applies
>the above workaround and I'll be happy; though diagnosing the Cygwin
>problem may then become impossible.
I pulled this from your previous email:
$ grep luke /etc/passwd
$ ls -aln ~/.profile
-rwxr-xr-x 1 11021 10513 4327 Aug 30 10:40 /home/luke/.profile
Your uid (11021) and SID (S-1-5-21--76180391-208020174-1021) don't match.
Are you sure this was generated by mkpasswd? You'll want to double check
this and the difference in ownership and permissions between the files that
vi is working with and those (like .profile) that it's not. I expect you'll
see a difference there. It's worth keeping in mind as well that the user
your trying to be in this case is a domain user. While this isn't a no-no,
it does come with some extra potential "gotchas" which I alluded to above
and which are covered in the email archives. But start with these checks
and make sure something here doesn't signal the problem.
Larry Hall email@example.com
RFK Partners, Inc. http://www.rfk.com
838 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html