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?


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. :( – prashant1988 Mar 11 '15 at 18:35
  • what are the permissions now? – Milind Dumbare Mar 11 '15 at 18:38
  • Here you go : drwx---rwx – prashant1988 Mar 11 '15 at 18:41
  • do chmod 757 /var then chmod ug-s /var and then chmod +t /var – Milind Dumbare Mar 11 '15 at 18:43
  • Same error :( Permissions are drwx---rwt now. It needs something like d..x..x..[xt] – prashant1988 Mar 11 '15 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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