Cygwin – Editor – Error – Message – E212 – “Can’t open file for editing”
Earlier in the year, a friend had setup Cygwin on my behalf.
For those a bit unfamiliar, Cygwin allows one to run Linux emulation on MS Windows computers.
Anyways, last couple of days turned on to the fact that I am a bit un-able to ssh to the computer when working on my laptop.
So what do:
- Tried pinging to make sure that I am able to resolve the DNS Names
- Tried telnet (telnet <hostname> 22)
- Tried ssh in verbose mode (ssh -A -vvv -l <username> <hostname>)
But, still the same “un-helpful” error message:
debug1: identity file /Users/<username>/.ssh/id_rsa type 1
debug1: identity file /Users/<username>/.ssh/id_rsa-cert type -1
debug1: identity file /Users/<username>/.ssh/id_dsa type -1
debug1: identity file /Users/<username>/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
So next in line is me remote desktop’ing to the windows box, and try to review the sshd logfile for cygwin.
That log file’s full name is /var/log/sshd.log
So journeyed to /var/log and performed a quick “ls -l”
$ ls -l
drwxr-xr-x+ 1 psmith root 0 Feb 6 2012 apache
drwxr-xr-x+ 1 psmith root 0 Feb 6 2012 apache2
-rw-r--r-- 1 cyg_server root 3072984 Nov 13 07:59 lastlog
-rw-r--r--+ 1 psmith Domain Users 0 Feb 6 2012 messages
-rw-r--r-- 1 psmith root 129106 Feb 6 2012 setup.log.full
-rw-r--r-- 1 cyg_server None 0 Feb 6 2012 sshd.log
-rwxr--r--+ 1 psmith Domain Users 49280 Nov 13 17:54 wtmp
And, obviously, sshd.log is empty, not half empty, fully empty.
The next steps are to edit sshd configuration file (enable verbose logging) and restart sshd.
So changed to the /etc folder and edited sshd_config.
But, each time I tried saving my changes kept getting the error message:
"sshd_config" E212: Can't open file for writing.
So what do, messed around for a bit and wished I was Ice-Cube and hit a tripple double.
But, no, just Daniel.
Later on went to my home folder (/home/<username>) and was able to create, edit, and saved files.
It makes a bit more sense now. Not able to save files…It appears likely that I just lack permissions.
Need to read-up on assigning permisions in cygwin.