Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

John Cowan-3
After many years as a contented Cygwin user, I decided to check out
the new Ubuntu on Windows (UoW) product from Microsoft.  I promptly
ran into a nasty problem.  I have filed it with the MS Feedback Hub,
but I thought I should post here as well.

When a file is created under Cygwin, it can neither be read nor written
by UoW.  Any attempt to do so returns EACCES.  It does not matter
whether the UoW user is root or not, and it does not matter what the
file permissions are as seen by UoW, or whether the file is in the UoW
root (which is really C:\Users\<username>\AppData\Local\lxss\rootfs)
or elsewhere on C: (which is mounted by UoW at /mnt/c).  It also does
not matter who has written to the file (Win32, Cygwin, or UoW).
Directories are not affected by this problem.

Is Cygwin creating ordinary files with some kind of magic that's different
from creating a file, say, by output redirection in cmd.exe, or in a Win32
application?  This is not about file names with funny characters, either.

--
John Cowan          http://www.ccil.org/~cowan        [hidden email]
C'est la` pourtant que se livre le sens du dire, de ce que, s'y conjuguant
le nyania qui bruit des sexes en compagnie, il supplee a ce qu'entre eux,
de rapport nyait pas.               --Jacques Lacan, "L'Etourdit"

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Gerrit Haase
2016-04-13 7:22 GMT+02:00 John Cowan wrote:
>
> When a file is created under Cygwin, ...

What do you mean "under Cygwin"? I always thought that there is no
difference at all, creating files worked always transparently for me,
given that the permissions were correctly set.


Regards,
Gerrit

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

LLoyd
That's what he is saying. Apparently, doing:
/cygdrive/c $ echo stuff > file1
and doing
C:\> echo stuff > file2
Does not produce exactly the same files.

John, if you can confirm?
Please also provide the "cat /mnt/c/file1" and "cat /mnt/c/file2" from UoW.

Regards,
LLoyd

On 13 April 2016 at 19:01, Gerrit Haase <[hidden email]> wrote:

> 2016-04-13 7:22 GMT+02:00 John Cowan wrote:
>>
>> When a file is created under Cygwin, ...
>
> What do you mean "under Cygwin"? I always thought that there is no
> difference at all, creating files worked always transparently for me,
> given that the permissions were correctly set.
>
>
> Regards,
> Gerrit
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

John Cowan-3
LLoyd scripsit:

> John, if you can confirm?

Exactly right.

> Please also provide the "cat /mnt/c/file1" and "cat /mnt/c/file2" from UoW.

From the Cygwin shell (note that my Cygwin and Windows home directories
are the same: /home/cowan is a Cygwin symlink to /cygdrive/c/Users/cowan):

cowan@large-skunk ~
$ echo stuff >file1

cowan@large-skunk ~
$ cat file1
stuff

cowan@large-skunk ~
$ ls -l file1
-rw-r--r--+ 1 cowan cowan 6 Apr 13 08:57 file1

From cmd.exe:

c:\Users\cowan>echo stuff >file2

c:\Users\cowan>type file2
stuff

From UoW bash prompt:

root@localhost:~# cd /mnt/c/Users/cowan
root@localhost:/mnt/c/Users/cowan# cat file1
cat: file1: Permission denied
root@localhost:/mnt/c/Users/cowan# cat file2
stuff
root@localhost:/mnt/c/Users/cowan# ls -l file1 file2
-rwxrwxrwx 1 root root 6 Apr 13 12:57 file1
-rwxrwxrwx 1 root root 8 Apr 13 12:57 file2

As you can see, they look exactly the same but are different somehow.
What is more, if I use cmd.exe echo to append to file1 and Cygwin echo
to append to file2, it changes nothing.  Likewise, if I overwrite them
completely, it changes nothing.  Only if I remove them and re-create
them from the "wrong" side does file1 become readable and file2 become
unreadable.

This is 64-bit Windows on an NTFS file system, but 32-bit Cygwin.  I'll
try installing Cygwin64 tonight and seeing if that makes any difference.

--
John Cowan          http://www.ccil.org/~cowan        [hidden email]
A: "Spiro conjectures Ex-Lax."
Q: "What does Pat Nixon frost her cakes with?"
  --"Jeopardy" for generative semanticists

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Eliot Moss
On 4/13/2016 9:11 AM, John Cowan wrote:

> LLoyd scripsit:
>
>> John, if you can confirm?
>
> Exactly right.
>
>> Please also provide the "cat /mnt/c/file1" and "cat /mnt/c/file2" from UoW.
>
>>From the Cygwin shell (note that my Cygwin and Windows home directories
> are the same: /home/cowan is a Cygwin symlink to /cygdrive/c/Users/cowan):
>
> cowan@large-skunk ~
> $ echo stuff >file1
>
> cowan@large-skunk ~
> $ cat file1
> stuff
>
> cowan@large-skunk ~
> $ ls -l file1
> -rw-r--r--+ 1 cowan cowan 6 Apr 13 08:57 file1
>
>>From cmd.exe:
>
> c:\Users\cowan>echo stuff >file2
>
> c:\Users\cowan>type file2
> stuff
>
>>From UoW bash prompt:
>
> root@localhost:~# cd /mnt/c/Users/cowan
> root@localhost:/mnt/c/Users/cowan# cat file1
> cat: file1: Permission denied
> root@localhost:/mnt/c/Users/cowan# cat file2
> stuff
> root@localhost:/mnt/c/Users/cowan# ls -l file1 file2
> -rwxrwxrwx 1 root root 6 Apr 13 12:57 file1
> -rwxrwxrwx 1 root root 8 Apr 13 12:57 file2
>
> As you can see, they look exactly the same but are different somehow.
> What is more, if I use cmd.exe echo to append to file1 and Cygwin echo
> to append to file2, it changes nothing.  Likewise, if I overwrite them
> completely, it changes nothing.  Only if I remove them and re-create
> them from the "wrong" side does file1 become readable and file2 become
> unreadable.
>
> This is 64-bit Windows on an NTFS file system, but 32-bit Cygwin.  I'll
> try installing Cygwin64 tonight and seeing if that makes any difference.


You can use the cygwin od (octal dump) command to see the exact byte contents
of the files.  (Use od -c <file>.)  I suspected that one difference was \r\n
line termination from Windows echo and \n termination from cygwin echo.  That
did not explain the two byte difference in length, however.  I tried it myself
and found that cmd's echo adds a space after "stuff".  If I do:
c:\Users\moss> echo stuff> file1
(Note: no space before the > !)
It writes "stuff" without the extra space.  The line termination is still \r\n.
cygwin's echo gets rid of the space (because bash trims it before passing the
"stuff" argument) and uses \n as the line terminator.

As for permissions issues, that would have to do with cygwin's permission
system, a rather different topic.

Perhaps you did not know that the two echo's are different?

Regards -- Eliot MOss

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

John Cowan-3
Eliot Moss scripsit:

> You can use the cygwin od (octal dump) command to see the exact byte
> contents of the files.

The exact contents aren't the point.  The point is that file1, created
under Cygwin, is not readable by UoW (or writable either), whereas file2,
created by very similar methods under Win32 proper, is readable and
writable by UoW.  So, for example, if I unpack a tarball of source
code using Cygwin tar, none of the files from the tarball are
readable by UoW.

--
John Cowan          http://www.ccil.org/~cowan        [hidden email]
Barry thirteen gules and argent on a canton azure fifty mullets of five
points of the second,  six, five, six, five, six, five, six, five, and six.
        --blazoning the U.S. flag

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Gerrit Haase
2016-04-13 17:43 GMT+02:00 John Cowan writes:
> The exact contents aren't the point.  The point is that file1, created
> under Cygwin, is not readable by UoW (or writable either), whereas file2,
> created by very similar methods under Win32 proper, is readable and
> writable by UoW.

Seems to be a permission issue, can you provide the output of:

icacls file1
icacls file2

please?

;)
Gerrit

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

KARL BOTTS
In reply to this post by John Cowan-3

How about the perms on the dir containing the file?


---
Karl Botts, [hidden email]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Andrey Repin
In reply to this post by John Cowan-3
Greetings, John Cowan!

>> You can use the cygwin od (octal dump) command to see the exact byte
>> contents of the files.

> The exact contents aren't the point.  The point is that file1, created
> under Cygwin, is not readable by UoW (or writable either), whereas file2,
> created by very similar methods under Win32 proper, is readable and
> writable by UoW.  So, for example, if I unpack a tarball of source
> code using Cygwin tar, none of the files from the tarball are
> readable by UoW.

Remove your symlink in the /home directory and use nsswitch.conf to configure
your home directory location.
Then set cygdrive to noacl and try again.


--
With best regards,
Andrey Repin
Thursday, April 14, 2016 01:20:46

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Evgeny Grin
In reply to this post by Eliot Moss


On 13.04.2016 16:36, Eliot Moss wrote:
> I tried it myself
> and found that cmd's echo adds a space after "stuff".  If I do:
> c:\Users\moss> echo stuff> file1
> (Note: no space before the > !)
> It writes "stuff" without the extra space.
cmd's echo doesn't add anything. It's just completely different from
sh/bash echo.
cmd's echo prints to stdout *whole command line*, ignoring first five
characters ('echo' itself and next char). It preserves any quoting and
trailing and leading spaces.

--
Best Wishes,
Evgeny Grin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Evgeny Grin
In reply to this post by Gerrit Haase
I can reproduce the problem.
Win10 Enterprise Build 14316 Insider Preview
Commands:
On cmd:
@ echo test1>cmd-file

On Cygwin sh:
$ echo test2>cygsh-file

On UoW bash sh:
# echo test3>uowsh-file
# cat cmd-file
test1
# cat cygsh-file
cat: cygsh-file: Permission denied
# cat uowsh-file
test3
# ls -alip
total 24
 562949953652128 drwxrwxrwx 2 root root    0 Apr 14 08:35 ./
 562949953523895 drwxrwxrwx 2 root root    0 Apr 14 08:27 ../
 281474976958606 -rwxrwxrwx 1 root root 1494 Apr 14 08:27 .bash_profile
 281474976958605 -rwxrwxrwx 1 root root 6054 Apr 14 08:27 .bashrc
3659174697238797 -rwxrwxrwx 1 root root    7 Apr 14 08:31 cmd-file
1125899907090593 -rwxrwxrwx 1 root root    6 Apr 14 08:38 cygsh-file
 281474976958608 -rwxrwxrwx 1 root root 1919 Apr 14 08:27 .inputrc
 281474976958609 -rwxrwxrwx 1 root root 1236 Apr 14 08:27 .profile
1688849860368294 -rwxrwxrwx 1 root root    6 Apr 14 08:35 uowsh-file

Back to cmd:
@ icacls cmd-file
cmd-file DESKTOP-5PNH8IH\Karlson:(RX)
         DESKTOP-5PNH8IH\Karlson:(I)(F)
         Everyone:(I)(RX)

@ icacls cygsh-file
cygsh-file DESKTOP-5PNH8IH\Karlson:(R,W,D,WDAC,WO)
           DESKTOP-5PNH8IH\Karlson:(R)
           Everyone:(R)

@ icacls uowsh-file
uowsh-file DESKTOP-5PNH8IH\Karlson:(RX)
           DESKTOP-5PNH8IH\Karlson:(I)(F)
           Everyone:(I)(RX)

@ more cmd-file
test1
@ more cygsh-file
test2
@ more uowsh-file
test3
@ dir
 Volume in drive C has no label.
 Volume Serial Number is 0A3F-B4C2

 Directory of C:\cygwin64\home\Karlson

14.04.2016  11:35    <DIR>          .
14.04.2016  11:35    <DIR>          ..
14.04.2016  11:27             6 054 .bashrc
14.04.2016  11:27             1 494 .bash_profile
14.04.2016  11:27             1 919 .inputrc
14.04.2016  11:27             1 236 .profile
14.04.2016  11:31                 7 cmd-file
14.04.2016  11:38                 6 cygsh-file
14.04.2016  11:35                 6 uowsh-file
               7 File(s)         10 722 bytes
               2 Dir(s)  103 532 670 976 bytes free

On Cygwin sh:
$ cat cmd-file
test1

$ cat cygsh-file
test2

$ cat uowsh-file
test3

$ ls -alip
total 27
 562949953652128 drwxr-xr-x+ 1 Karlson Karlson    0 Apr 14 11:35 ./
 562949953523895 drwxrwxrwt+ 1 Karlson Karlson    0 Apr 14 11:27 ../
 281474976958606 -rwxr-xr-x  1 Karlson Karlson 1494 Apr 14 11:27
.bash_profile
 281474976958605 -rwxr-xr-x  1 Karlson Karlson 6054 Apr 14 11:27 .bashrc
 281474976958608 -rwxr-xr-x  1 Karlson Karlson 1919 Apr 14 11:27 .inputrc
 281474976958609 -rwxr-xr-x  1 Karlson Karlson 1236 Apr 14 11:27 .profile
3659174697238797 -rwxr-xr-x  1 Karlson Karlson    7 Apr 14 11:31 cmd-file
1125899907090593 -rw-r--r--  1 Karlson Karlson    6 Apr 14 11:38 cygsh-file
1688849860368294 -rwxr-xr-x  1 Karlson Karlson    6 Apr 14 11:35 uowsh-file


Permissions are definitely different for file created in Cygwin.

--
Best Wishes,
Evgeny Grin


On 13.04.2016 19:21, Gerrit Haase wrote:

> 2016-04-13 17:43 GMT+02:00 John Cowan writes:
>> The exact contents aren't the point.  The point is that file1, created
>> under Cygwin, is not readable by UoW (or writable either), whereas file2,
>> created by very similar methods under Win32 proper, is readable and
>> writable by UoW.
>
> Seems to be a permission issue, can you provide the output of:
>
> icacls file1
> icacls file2
>
> please?
>
> ;)
> Gerrit
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Evgeny Grin
Need to add that I'm using latest Cygwin64:
$ uname -r
2.5.0(0.297/5/3)


On 14.04.2016 12:11, Evgeny Grin wrote:

> I can reproduce the problem.
> Win10 Enterprise Build 14316 Insider Preview
> Commands:
> On cmd:
> @ echo test1>cmd-file
>
> On Cygwin sh:
> $ echo test2>cygsh-file
>
> On UoW bash sh:
> # echo test3>uowsh-file
> # cat cmd-file
> test1
> # cat cygsh-file
> cat: cygsh-file: Permission denied
> # cat uowsh-file
> test3
> # ls -alip
> total 24
>  562949953652128 drwxrwxrwx 2 root root    0 Apr 14 08:35 ./
>  562949953523895 drwxrwxrwx 2 root root    0 Apr 14 08:27 ../
>  281474976958606 -rwxrwxrwx 1 root root 1494 Apr 14 08:27 .bash_profile
>  281474976958605 -rwxrwxrwx 1 root root 6054 Apr 14 08:27 .bashrc
> 3659174697238797 -rwxrwxrwx 1 root root    7 Apr 14 08:31 cmd-file
> 1125899907090593 -rwxrwxrwx 1 root root    6 Apr 14 08:38 cygsh-file
>  281474976958608 -rwxrwxrwx 1 root root 1919 Apr 14 08:27 .inputrc
>  281474976958609 -rwxrwxrwx 1 root root 1236 Apr 14 08:27 .profile
> 1688849860368294 -rwxrwxrwx 1 root root    6 Apr 14 08:35 uowsh-file
>
> Back to cmd:
> @ icacls cmd-file
> cmd-file DESKTOP-5PNH8IH\Karlson:(RX)
>          DESKTOP-5PNH8IH\Karlson:(I)(F)
>          Everyone:(I)(RX)
>
> @ icacls cygsh-file
> cygsh-file DESKTOP-5PNH8IH\Karlson:(R,W,D,WDAC,WO)
>            DESKTOP-5PNH8IH\Karlson:(R)
>            Everyone:(R)
>
> @ icacls uowsh-file
> uowsh-file DESKTOP-5PNH8IH\Karlson:(RX)
>            DESKTOP-5PNH8IH\Karlson:(I)(F)
>            Everyone:(I)(RX)
>
> @ more cmd-file
> test1
> @ more cygsh-file
> test2
> @ more uowsh-file
> test3
> @ dir
>  Volume in drive C has no label.
>  Volume Serial Number is 0A3F-B4C2
>
>  Directory of C:\cygwin64\home\Karlson
>
> 14.04.2016  11:35    <DIR>          .
> 14.04.2016  11:35    <DIR>          ..
> 14.04.2016  11:27             6 054 .bashrc
> 14.04.2016  11:27             1 494 .bash_profile
> 14.04.2016  11:27             1 919 .inputrc
> 14.04.2016  11:27             1 236 .profile
> 14.04.2016  11:31                 7 cmd-file
> 14.04.2016  11:38                 6 cygsh-file
> 14.04.2016  11:35                 6 uowsh-file
>                7 File(s)         10 722 bytes
>                2 Dir(s)  103 532 670 976 bytes free
>
> On Cygwin sh:
> $ cat cmd-file
> test1
>
> $ cat cygsh-file
> test2
>
> $ cat uowsh-file
> test3
>
> $ ls -alip
> total 27
>  562949953652128 drwxr-xr-x+ 1 Karlson Karlson    0 Apr 14 11:35 ./
>  562949953523895 drwxrwxrwt+ 1 Karlson Karlson    0 Apr 14 11:27 ../
>  281474976958606 -rwxr-xr-x  1 Karlson Karlson 1494 Apr 14 11:27
> .bash_profile
>  281474976958605 -rwxr-xr-x  1 Karlson Karlson 6054 Apr 14 11:27 .bashrc
>  281474976958608 -rwxr-xr-x  1 Karlson Karlson 1919 Apr 14 11:27 .inputrc
>  281474976958609 -rwxr-xr-x  1 Karlson Karlson 1236 Apr 14 11:27 .profile
> 3659174697238797 -rwxr-xr-x  1 Karlson Karlson    7 Apr 14 11:31 cmd-file
> 1125899907090593 -rw-r--r--  1 Karlson Karlson    6 Apr 14 11:38 cygsh-file
> 1688849860368294 -rwxr-xr-x  1 Karlson Karlson    6 Apr 14 11:35 uowsh-file
>
>
> Permissions are definitely different for file created in Cygwin.
>

--
Best Wishes,
Evgeny Grin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

John Cowan-3
In reply to this post by Gerrit Haase
Gerrit Haase scripsit:

> Seems to be a permission issue, can you provide the output of:
>
> icacls file1
> icacls file2

Here they are:

cowan@large-skunk ~
$ icacls file1
file1 NULL SID:(DENY)(Rc,S,X,DC)
      LARGE-SKUNK\cowan:(R,W,D,WDAC,WO)
      NT AUTHORITY\SYSTEM:(DENY)(S,X)
      BUILTIN\Administrators:(DENY)(S,X)
      LARGE-SKUNK\cowan:(R)
      NT AUTHORITY\SYSTEM:(RX,W)
      BUILTIN\Administrators:(RX,W)
      Everyone:(R)

Successfully processed 1 files; Failed processing 0 files

cowan@large-skunk ~
$ icacls file2
file2 NT AUTHORITY\SYSTEM:(F)
      BUILTIN\Administrators:(F)
      LARGE-SKUNK\cowan:(F)

Successfully processed 1 files; Failed processing 0 files

So apparently the SID used by the UoW subsystem is not one that has
read access.

Andrey Repin scripsit:

> Remove your symlink in the /home directory and use nsswitch.conf to configure
> your home directory location.

I assume you mean fstab.  I removed the symlink, created a directory, and
set the fstab entry for just my home directory to "noacl".  Then I created
file3 from Cygwin, and icacls reports:

cowan@large-skunk ~
$ icacls file3
file3 NT AUTHORITY\SYSTEM:(F)
      BUILTIN\Administrators:(F)
      LARGE-SKUNK\cowan:(F)

So that works for all files created in the future, but doesn't do anything
for all the files I already have in Cygwin.

> Then set cygdrive to noacl and try again.

I have set both / and /cygdrive to noacl, so now I can read any newly
created file anywhere on the disk, but existing files are as inaccessible
as ever.  I suspect it is the NULL SID: (DENY) entry that is causing the
problem.  Why does Cygwin do that?  My umask is 022, so all files should
be world readable.

I'm now running "icacls . /reset /t /c /l /q" from /cygdrive/c/cygwin,
which takes real time but should dispose of the problem once and for all.

However, either Cygwin should be more selective about the ACEs it creates,
or UoW should use SIDs somewhat more intelligently.

--
John Cowan          http://www.ccil.org/~cowan        [hidden email]
"Make a case, man; you're full of naked assertions, just like Nietzsche."
"Oh, i suffer from that, too.  But you know, naked assertions or GTFO."
                        --heard on #scheme, sorta

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

KARL BOTTS
In reply to this post by John Cowan-3

Did the inability of UoW to read a Cygwin created file ever get explained?

Last I saw was from Evgeny Grin, which contained the iacls dumps.

What jumps out is that the non-Cyg files have X perms, the Cyg file does not.
I assume others noticed that.  Of course, X perms should not be needed to read
the file.

Also, the perms shown by the UoW ls differ a lot from what the Cyg ls shows,
for the same file.  It would seem they are _interpreting_ Win perms as
different sets of Unix perms.

And the creat() operation may be _assigning_ the Win perms differently, too.
Maybe differences handling umask values, or maybe different "effective" umask
values, somehow?  Yet somehow I doubt the umask is it; there could be lots of
underlying causes.

I am not a bit surprised things differ.  Who do we think is right, if either?


And then, an interesting question.  Suppose we Cygwin users think we have
identified a defect in UoW.  Do we notify the MS people?  Whom and how?  I
guess I think we should, though I'm not happy about it.  (If they are wise,
they will be lurking here, for exactly this reason...)


Really, I am just curious, no dog in any fight...


---
Karl Botts, [hidden email]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

John Cowan-3
KARL BOTTS scripsit:

> Did the inability of UoW to read a Cygwin created file ever get explained?

See the long post I just sent out.

> And then, an interesting question.  Suppose we Cygwin users think we have
> identified a defect in UoW.  Do we notify the MS people?  Whom and how?  I
> guess I think we should, though I'm not happy about it.  (If they are wise,
> they will be lurking here, for exactly this reason...)

There may or may not be a defect in UoW in terms of UoW processes not having the
permissions they should have.  On the other hand, Cygwin is definitely creating
strange ACEs that make files it creates inaccessible to UoW.

--
John Cowan          http://www.ccil.org/~cowan        [hidden email]
Clear?  Huh!  Why a four-year-old child could understand this report.
Run out and find me a four-year-old child.  I can't make head or tail
out of it.        --Rufus T. Firefly on government reports

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Gerrit Haase
In reply to this post by John Cowan-3
2016-04-15 2:50 GMT+02:00 John Cowan wrtites:
> cowan@large-skunk ~

LOL, love your machines hostname ;)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Gerrit Haase
In reply to this post by Evgeny Grin
2016-04-14 11:11 GMT+02:00 Evgeny Grin wrote:

> Back to cmd:
> @ icacls cmd-file
> cmd-file DESKTOP-5PNH8IH\Karlson:(RX)
>          DESKTOP-5PNH8IH\Karlson:(I)(F)
>          Everyone:(I)(RX)
>
> @ icacls cygsh-file
> cygsh-file DESKTOP-5PNH8IH\Karlson:(R,W,D,WDAC,WO)
>            DESKTOP-5PNH8IH\Karlson:(R)
>            Everyone:(R)
>
> @ icacls uowsh-file
> uowsh-file DESKTOP-5PNH8IH\Karlson:(RX)
>            DESKTOP-5PNH8IH\Karlson:(I)(F)
>            Everyone:(I)(RX)

Everyone:(X) is missing on the Cygwin created file, Karlson has (R)
besides the inherited (F) access from the other files.

Curious if the X byte is required or the F, both would be strange
though. Does the result changes iof you add X for everyone and/or (F)
instead of (R) for Karlson?

There are some remarkable things besides this one, IIRC someone
mentioned in the other thread, that there is no UoW AD integration, so
how does UoW creates a file with permissions set for Karlson?

BTW. who is Karlson?

;)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

Corinna Vinschen-2
On Apr 15 10:48, Gerrit Haase wrote:

> 2016-04-14 11:11 GMT+02:00 Evgeny Grin wrote:
> > Back to cmd:
> > @ icacls cmd-file
> > cmd-file DESKTOP-5PNH8IH\Karlson:(RX)
> >          DESKTOP-5PNH8IH\Karlson:(I)(F)
> >          Everyone:(I)(RX)
> >
> > @ icacls cygsh-file
> > cygsh-file DESKTOP-5PNH8IH\Karlson:(R,W,D,WDAC,WO)
> >            DESKTOP-5PNH8IH\Karlson:(R)
> >            Everyone:(R)
> >
> > @ icacls uowsh-file
> > uowsh-file DESKTOP-5PNH8IH\Karlson:(RX)
> >            DESKTOP-5PNH8IH\Karlson:(I)(F)
> >            Everyone:(I)(RX)
>
> Everyone:(X) is missing on the Cygwin created file, Karlson has (R)
> besides the inherited (F) access from the other files.
(X) is not missing.  Cygwin honors umask.  Your umask is probably 0022.

> There are some remarkable things besides this one, IIRC someone
> mentioned in the other thread, that there is no UoW AD integration, so
> how does UoW creates a file with permissions set for Karlson?

There's no information here which isn't availabe by default or from
the user's token.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

John Cowan-3
In reply to this post by Gerrit Haase
Gerrit Haase scripsit:

> > cowan@large-skunk ~
>
> LOL, love your machines hostname ;)

It's 100% RFC 1178 compliant, and has the big advantage that it is almost
never in use on any network I belong to, so my home machines are always
called some variant of "skunk", and my work machines too when I get to
pick their names (not often, nowadays).

Also, it makes people laugh.

--
John Cowan          http://www.ccil.org/~cowan        [hidden email]
Is a chair finely made tragic or comic? Is the portrait of Mona Lisa
good if I desire to see it? Is the bust of Sir Philip Crampton lyrical,
epical or dramatic?  If a man hacking in fury at a block of wood make
there an image of a cow, is that image a work of art? If not, why not?
                --Stephen Dedalus

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316

boulderfans

> It's 100% RFC 1178 compliant,

I have never seen that before. That's awesome. Thanks for that.

I do have one thing they missed: I once named a machine "Null". Screwed up the whole network.

I find it interesting that the string representation of "Null" is actually used for some networking purposes. Apparently it is also used as a special case in databases as well apparently as a last name of "Null" messes up all sorts of systems.

</threadjack>

-Matt

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

12