Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How/why cygwin breaks windows permissions?

We have complaints "from the field" (i.e. from sysadmins installing software) that cygwin "messes up" windows permissions on NTFS (Windows 7/10/2008/2012, etc).

Problem Usecase

The general usecase is this:

  • Sysadmin launches some 'software installer' from the cygwin bash cmd line
  • Installer runs fine
  • Sysadmin tries to start windows services

Result: Service fails to start

Workaround Steps

These steps seem to get past the problem:

  • Sysadmin resets ntfs permissions with windows ICACLS command : (in this example "acme" is the newly created directory. This command sets acme and its children to re-inherit permissions from folder "d:\instances"

    d:\instances> icacls acme /RESET /T /C /Q

  • Sysadmin starts service

Result: Windows service starts

Question

  • What makes cygwin handle permissions for newly-written files differently than powershell? Is it a matter of a wrong version of umask?
  • Can the sysadmin take steps in advance to ensure cygwin sets up permissions properly?

thanks in advance

like image 297
user331465 Avatar asked Mar 31 '17 17:03

user331465


1 Answers

I found the answer here; it refers to this mailing-list letter.

You need to edit Cygwin's /etc/fstab and add "noacl" to the list of mount-options.

like image 73
ulatekh Avatar answered Oct 20 '22 00:10

ulatekh