This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can't write .profile from vi

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
	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
lukep:unused_by_nt/2000/xp:12898:10513:Luke Paton,U-CISRA\lukep,S-1-5-21-5706737
$ ls -aln ~/.profile
-rwxr-xr-x    1 11021    10513        4327 Aug 30 10:40 /home/luke/.profile

> 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:
>  >Bug reporting:
>  >Documentation:
>  >FAQ:         
>  >
>  >
> >  
>  >
>  --
>  Unsubscribe info:
>  Bug reporting:
>  Documentation:
>  FAQ:         

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]