I'm trying to setup ssh-host in Cygwin and am getting the below error:

*** Warning: The permissions on the directory /var are not correct.
*** Warning: They must match the regexp d..x..x..[xt]
*** ERROR: Problem with /var directory. Exiting.

As of now, the /var directory has the below permissions.

$ ls -ld /var
drws--Srwx+ 1 Prashant Prashant 0 Mar 11 22:29 /var

How do I set d..x..x..[xt] permissions for /var?

2 Answers 2


In Cygwin, it's not possible to change group permissions unless the group is Users or Root. Refer to 'chmod' cannot change group permission on Cygwin.

You won't be able to change the group permission until you change var's group owner to Users, so the best solution is:

chown :Users /var
chmod 757 /var
chmod ug-s /var
chmod +t /var

The last step of setting sticky bit is not really necessary though.

  • This isn't working. Same error. :( Mar 11, 2015 at 18:35
  • what are the permissions now? Mar 11, 2015 at 18:38
  • Here you go : drwx---rwx Mar 11, 2015 at 18:41
  • do chmod 757 /var then chmod ug-s /var and then chmod +t /var Mar 11, 2015 at 18:43
  • Same error :( Permissions are drwx---rwt now. It needs something like d..x..x..[xt] Mar 11, 2015 at 18:45

To solve this you first need to add Cygwin to Windows' environment variables.

Do so by right clicking on computer and select Properties, then choose Advanced system settings and under the Advanced tab choose Environment Variables.

Locate "Path" under System variables and add ";C:\Cygwin\bin" with the semicolon at the end of it.

After you have done that run Cygwin as administrator and do as Miline suggested. It worked for me, so I hope it will work for others.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .