Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Info: This message was accepted for relay by smtp02.mrf.mail.rcn.net as the sender used SMTP authentication X-Trace: UmFuZG9tSVZJOUilHgIkrin/ySLM4idKyAkfJWKWWvuOGcOSoIQlmO+NS/dwOtD2 Message-Id: <4.3.1.2.20020905221632.021f0f78@pop.rcn.com> X-Sender: lhall AT pop DOT rcn DOT com Date: Thu, 05 Sep 2002 22:24:06 -0400 To: luke DOT kendall AT cisra DOT canon DOT com DOT au, cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: Can't write any dot files from vi In-Reply-To: <20020906021904.5CBF35A76@ivory.research.canon.com.au> References: <20020906014621 DOT 9FC725A84 AT ivory DOT research DOT canon DOT com DOT au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 10:19 PM 9/5/2002, luke DOT kendall AT cisra DOT canon DOT com DOT au 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 luke:unused_by_nt/2000/xp:11021:10513:Luke Kendall,U-CISRA\luke,S-1-5-21-5706737 -76180391-208020174-1021:/home/luke:/bin/bash lukep:unused_by_nt/2000/xp:12898:10513:Luke Paton,U-CISRA\lukep,S-1-5-21-5706737 -76180391-208020174-2898:/home/lukep:/bin/bash $ 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. Good luck, Larry Hall lhall AT rfk DOT 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 Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/