0

I already tried the solution cygwin sets file permission to 000. It doesn't work. Actually, my version of cygwin 1.5.25(0.156/4/2) doesn't even have file /etc/fstab...

So, my problem is I have an executable that creates binary files. Those generated files have permission 000. I did the same test by calling the same executable on windows, and then permission are correct. See :

Files created on windows side:

$ ls -ls pct-win/
total 2135
   0 -rwx------+ 1 Administrators Domain Users       0 Jan 22 16:56 autopron*
   1 -rwx------+ 1 Administrators Domain Users     281 Jan 22 16:56 grammar*
2132 -rwx------+ 1 Administrators Domain Users 2179493 Jan 22 16:56 lexicon*
   1 -rwx------+ 1 Administrators Domain Users      79 Jan 22 16:56 package*
   1 -rwx------+ 1 Administrators Domain Users     223 Jan 22 16:56 semantic*

Files created on cygwin side

$ ls -ls pct
total 2135
   0 ----------+ 1 pboily Domain Users       0 Jan 23 11:07 autopron
   1 ----------+ 1 pboily Domain Users     281 Jan 23 11:07 grammar
2132 ----------+ 1 pboily Domain Users 2179493 Jan 23 11:07 lexicon
   1 ----------+ 1 pboily Domain Users      79 Jan 23 11:07 package
   1 ----------+ 1 pboily Domain Users     223 Jan 23 11:07 semantic

Ah, and one last thing, if I create a file with touch, permissions look like this :

-rw-r--r-- 1 pboily Domain Users 0 Jan 23 11:18 toto.txt

peterphonic
  • 951
  • 1
  • 19
  • 38
  • So, why are you using an obsolete version of Cygwin? – varro Jan 23 '19 at 17:43
  • @varro Because I unfortunately have to bring a fix on a really old software that we are still selling. Upgrading our environment will cost more. This project use visual studio 2003. Oh yeah, really, I have a loooooooooooot of fun. – peterphonic Jan 23 '19 at 17:49
  • how you created the files, what are the permissions of the directory and what is the value shows by `umask` ? – matzeri Jan 23 '19 at 18:48

0 Answers0