Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I ran into a weird directory permission problem when logged in to a Win2008SP2 (not R2) server through SSH. When I open a local cygwin shell on the server, i can do this:

myUser@myServer ~
$ cd /cygdrive/c/Windows/System32/inetsrv/

myUser@myServer /cygdrive/c/Windows/System32/inetsrv
$ cd config

myUser@myServer /cygdrive/c/Windows/System32/inetsrv/config
$

I have no issues accessing the 'config' directory when using a local cygwin shell. 'myUser' has all necessary permissions to access the directory as well. In fact, 'myUser' is a local administrator on the machine.

Listing the permissions of the config folder through the local cygwin shell shows the following output:

   4 drwx------+ 1 SYSTEM         SYSTEM             0 Aug  2 09:38 config

But when I log into the server with a SSH client (in this case Putty), i run into the following problem:

myUser@myServer ~
$ cd /cygdrive/c/Windows/System32/inetsrv/

myUser@myServer /cygdrive/c/Windows/System32/inetsrv
$ cd config
-bash: cd: config: Permission denied

It also doesn't list the proper permissions through SSH:

0 drwxr-x---  1 ????????       ????????           0 Aug  2 09:38 config

When I look at the running processes on the server with Task Manager (with a remote desktop connection), it shows that all bash.exe processes are running under the 'myUser' account, so I don't understand why I can't access that particular directory through SSH but have no problems accessing it in a local cygwin shell.

I'm using OpenSSH 5.9p1-1. I'm not sure what the Cygwin version is... I used the latest setup.exe (version 2.738) of Cygwin, but I can't seem the find any other Cygwin-related version number.

I doubt that it's related to SSH/Cygwin though, because when I connect from the Win2008SP2 server to my local Win7 machine through SSH (using the same OpenSSH/Cygwin versions) I can access the /cygdrive/c/Windows/System32/inetsrv/config folder without issues.

Does anyone have an idea on what the issue could be?

share|improve this question

1 Answer 1

It turned out to be because the ssh service on the server running as a local 'sshd_server' user. Even though I was logged in with a domain user which has sufficient privileges, accessing the directory was blocked (for reasons that aren't clear to me) because of the sshd_user the service ran under.

The solution was to run the ssh service under a domain account which had sufficient privileges to access the folder, and then it worked. I'm not entirely happy with this solution though, and would love to hear bet

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.