Can't write .profile from vi

luke.kendall@cisra.canon.com.au luke.kendall@cisra.canon.com.au
Thu Sep 5 18:50:00 GMT 2002


On  2 Sep, Cyber.Zombie wrote:
>  "cat /etc/passwd" and look at your numeric user and group ids.  Now do a 
>  "ls -aln .profile".  I'm betting (given you're on a domain) that the id 
>  is not gonna match up with what NT thinks it should be -- and you should 
>  do a "mkpasswd -d ..." rather than -l (same using mkgroup).
>  
>  Either that or do a "w!" (or chmod 777) on .profile...

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

I tried your other suggestion, too, and (not surprisingly, given the
above facts), that checked out okay too:

$ 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


>  luke.kendall@cisra.canon.com.au wrote:
>  
>  >My ~/.profile file is the only one I've found with this problem.
>  >As far a I can see, I have write permission, I am me, but I'm not
>  >allowed to write the file from vi!  I have to write it into another
>  >file in my home directory and then cp that on top of .profile!
>  >
>  >$ vi ~/.profile
>  >
>  >-rwxr-xr-x    1 luke     Domain U     4327 Aug 30 10:40 /home/luke/.profile
>  >Hit ENTER or type command to continue
>  >uid=11021(luke) gid=10513(Domain Users) groups=10513(Domain Users)
>  >"~/.profile"
>  >"~/.profile" E212: Can't open file for writing
>  >Hit ENTER or type command to continue
>  >
>  >I'm using /usr/bin/vi from the Cygwin installation.
>  >
>  >luke
>  >
>  >
>  >--
>  >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/
>  >
>  >
> >  
>  >
>  
>  
>  
>  --
>  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/
>  
>  



--
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/



More information about the Cygwin mailing list