3

I am using Cygwin with a dll version of 1.5.19 (yes, out-of-date, I know, but we're doing it for configuration control reasons). All my files (existing and newly created) show up with permissions 644, despite a umask of 022. Also, using chmod doesn't change the permissions. I have ntsec set in the CYGWIN environment variable. I need to be able to add execute permissions; is there anything I can try to fix this or is it a lost cause?


A much later note: I realized that a key part of the problem is that the files I was trying to chmod were in a ClearCase dynamic view, which uses MVFS. I still have not found way to successfully set the execute permissions, though.

mbyrne215
  • 2,304
  • 4
  • 21
  • 16

2 Answers2

6

Edit /etc/passwd to change the default value for GID for your user to 545 (i.e. NT 'Users' group) instead of 513 ('None' group).

Review system-wide /etc/bash.bashrc, $HOME/.bashrc and .bash_profile for default umask settings.

Even if default, do try to set CYGWIN variable in NT system environment to "binmode ntsec".

Let me know if problems disappear.

the
  • 21,007
  • 11
  • 68
  • 101
2

You need /etc/passwd and /etc/group files for permissions to work correctly.

See Why doesn't chmod work? in the Cygwin FAQ

and

File Permissions in the Cgywin User's Guide

nowox
  • 25,978
  • 39
  • 143
  • 293
Ken Gentle
  • 13,277
  • 2
  • 41
  • 49
  • I have both of these files, set up with the SIDs as described in those links. Still no luck. – mbyrne215 Dec 10 '08 at 21:04
  • Hmmm... works for me. I'm using 1.5.25 and have `ntea` set in CYGWIN (although the latest documentation says that both `ntea` and `ntsec` have been removed.) – Ken Gentle Dec 10 '08 at 21:13
  • Is the drive mounted with anything unusual? Like `noacl`? – Ken Gentle Dec 10 '08 at 21:21
  • Not that I can tell. All the mount points were created automatically, and they don't list 'noacl' when I list them with 'mount'. – mbyrne215 Dec 10 '08 at 21:39
  • Ok, dumb question: Is the drive NTFS? Last thing to suggest: use "mount --system --binary "C:" /c" and try it. I've got all my local drives and common network shares mounted explicitly. Shouldn't make a difference, but... – Ken Gentle Dec 10 '08 at 23:01