public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
@ 2016-04-13 17:32 KARL BOTTS
  0 siblings, 0 replies; 24+ messages in thread
From: KARL BOTTS @ 2016-04-13 17:32 UTC (permalink / raw)
  To: cygwin


How about the perms on the dir containing the file?


---
Karl Botts, kdbotts@usa.net


--
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-18 13:26                   ` Gerrit Haase
@ 2016-04-18 17:14                     ` Gerrit Haase
  0 siblings, 0 replies; 24+ messages in thread
From: Gerrit Haase @ 2016-04-18 17:14 UTC (permalink / raw)
  To: cygwin

2016-04-18 15:25 GMT+02:00 Gerrit Haase wrote:
> my thought was, that UoW maybe requires (X) to access a file,
> because this is the bit missing from these files, and of course this
> is most probably a bug in UoW, if adding (X) is the solution to access
> Cygwin created files from UoW.


And this is it:
root@localhost:/mnt/c/cygwin/home/Gerrit# cat file3
cat: file3: Permission denied

Gerrit@GPHT410 ~
$ chmod a+x file3

root@localhost:/mnt/c/cygwin/home/Gerrit# cat file3
hello


root@localhost:/mnt/c/cygwin/home/Gerrit# ls -la file3
-rwxrwxrwx 1 root root 6 Apr 18 17:07 file3
root@localhost:/mnt/c/cygwin/home/Gerrit# chmod 644 file3
root@localhost:/mnt/c/cygwin/home/Gerrit# ls -la file3
-rwxrwxrwx 1 root root 6 Apr 18 17:07 file3


LOL...

--
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15 11:38                 ` Corinna Vinschen
  2016-04-16 18:54                   ` Evgeny Grin
@ 2016-04-18 13:26                   ` Gerrit Haase
  2016-04-18 17:14                     ` Gerrit Haase
  1 sibling, 1 reply; 24+ messages in thread
From: Gerrit Haase @ 2016-04-18 13:26 UTC (permalink / raw)
  To: cygwin

2016-04-15 13:38 GMT+02:00 Corinna Vinschen wrote:
> 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.


Sorry Corinna, I didn't mean that Cygwin is setting the permissions
wrong; my thought was, that UoW maybe requires (X) to access a file,
because this is the bit missing from these files, and of course this
is most probably a bug in UoW, if adding (X) is the solution to access
Cygwin created files from UoW.

;)
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15  8:49               ` Gerrit Haase
  2016-04-15 11:38                 ` Corinna Vinschen
@ 2016-04-16 18:58                 ` Evgeny Grin
  1 sibling, 0 replies; 24+ messages in thread
From: Evgeny Grin @ 2016-04-16 18:58 UTC (permalink / raw)
  To: cygwin



On 15.04.2016 11:48, Gerrit Haase wrote:
> BTW. who is Karlson?
It's Karlson på taket.
:)

-- 
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15 11:38                 ` Corinna Vinschen
@ 2016-04-16 18:54                   ` Evgeny Grin
  2016-04-18 13:26                   ` Gerrit Haase
  1 sibling, 0 replies; 24+ messages in thread
From: Evgeny Grin @ 2016-04-16 18:54 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 932 bytes --]



On 15.04.2016 14:38, Corinna Vinschen wrote:
> 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.
I didn't set any special mask and didn't change default permissions.


-- 
Best Wishes,
Evgeny Grin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15 16:23                 ` John Cowan
@ 2016-04-16 12:50                   ` Matt Smith
  0 siblings, 0 replies; 24+ messages in thread
From: Matt Smith @ 2016-04-16 12:50 UTC (permalink / raw)
  To: cygwin


> 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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15  8:47               ` Gerrit Haase
@ 2016-04-15 16:23                 ` John Cowan
  2016-04-16 12:50                   ` Matt Smith
  0 siblings, 1 reply; 24+ messages in thread
From: John Cowan @ 2016-04-15 16:23 UTC (permalink / raw)
  To: cygwin

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        cowan@ccil.org
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15  8:49               ` Gerrit Haase
@ 2016-04-15 11:38                 ` Corinna Vinschen
  2016-04-16 18:54                   ` Evgeny Grin
  2016-04-18 13:26                   ` Gerrit Haase
  2016-04-16 18:58                 ` Evgeny Grin
  1 sibling, 2 replies; 24+ messages in thread
From: Corinna Vinschen @ 2016-04-15 11:38 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-14  9:12             ` Evgeny Grin
  2016-04-14  9:35               ` Evgeny Grin
@ 2016-04-15  8:49               ` Gerrit Haase
  2016-04-15 11:38                 ` Corinna Vinschen
  2016-04-16 18:58                 ` Evgeny Grin
  1 sibling, 2 replies; 24+ messages in thread
From: Gerrit Haase @ 2016-04-15  8:49 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15  0:51             ` John Cowan
@ 2016-04-15  8:47               ` Gerrit Haase
  2016-04-15 16:23                 ` John Cowan
  0 siblings, 1 reply; 24+ messages in thread
From: Gerrit Haase @ 2016-04-15  8:47 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-15  0:56 KARL BOTTS
@ 2016-04-15  1:04 ` John Cowan
  0 siblings, 0 replies; 24+ messages in thread
From: John Cowan @ 2016-04-15  1:04 UTC (permalink / raw)
  To: cygwin

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        cowan@ccil.org
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
@ 2016-04-15  0:56 KARL BOTTS
  2016-04-15  1:04 ` John Cowan
  0 siblings, 1 reply; 24+ messages in thread
From: KARL BOTTS @ 2016-04-15  0:56 UTC (permalink / raw)
  To: cygwin


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, kdbotts@usa.net


--
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 16:22           ` Gerrit Haase
  2016-04-14  9:12             ` Evgeny Grin
@ 2016-04-15  0:51             ` John Cowan
  2016-04-15  8:47               ` Gerrit Haase
  1 sibling, 1 reply; 24+ messages in thread
From: John Cowan @ 2016-04-15  0:51 UTC (permalink / raw)
  To: cygwin

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        cowan@ccil.org
"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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-14  9:12             ` Evgeny Grin
@ 2016-04-14  9:35               ` Evgeny Grin
  2016-04-15  8:49               ` Gerrit Haase
  1 sibling, 0 replies; 24+ messages in thread
From: Evgeny Grin @ 2016-04-14  9:35 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 16:22           ` Gerrit Haase
@ 2016-04-14  9:12             ` Evgeny Grin
  2016-04-14  9:35               ` Evgeny Grin
  2016-04-15  8:49               ` Gerrit Haase
  2016-04-15  0:51             ` John Cowan
  1 sibling, 2 replies; 24+ messages in thread
From: Evgeny Grin @ 2016-04-14  9:12 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 13:36       ` Eliot Moss
  2016-04-13 15:44         ` John Cowan
@ 2016-04-14  8:17         ` Evgeny Grin
  1 sibling, 0 replies; 24+ messages in thread
From: Evgeny Grin @ 2016-04-14  8:17 UTC (permalink / raw)
  To: cygwin



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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 15:44         ` John Cowan
  2016-04-13 16:22           ` Gerrit Haase
@ 2016-04-13 22:35           ` Andrey Repin
  1 sibling, 0 replies; 24+ messages in thread
From: Andrey Repin @ 2016-04-13 22:35 UTC (permalink / raw)
  To: John Cowan, cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 15:44         ` John Cowan
@ 2016-04-13 16:22           ` Gerrit Haase
  2016-04-14  9:12             ` Evgeny Grin
  2016-04-15  0:51             ` John Cowan
  2016-04-13 22:35           ` Andrey Repin
  1 sibling, 2 replies; 24+ messages in thread
From: Gerrit Haase @ 2016-04-13 16:22 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 13:36       ` Eliot Moss
@ 2016-04-13 15:44         ` John Cowan
  2016-04-13 16:22           ` Gerrit Haase
  2016-04-13 22:35           ` Andrey Repin
  2016-04-14  8:17         ` Evgeny Grin
  1 sibling, 2 replies; 24+ messages in thread
From: John Cowan @ 2016-04-13 15:44 UTC (permalink / raw)
  To: cygwin

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        cowan@ccil.org
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 13:11     ` John Cowan
@ 2016-04-13 13:36       ` Eliot Moss
  2016-04-13 15:44         ` John Cowan
  2016-04-14  8:17         ` Evgeny Grin
  0 siblings, 2 replies; 24+ messages in thread
From: Eliot Moss @ 2016-04-13 13:36 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 12:29   ` LLoyd
@ 2016-04-13 13:11     ` John Cowan
  2016-04-13 13:36       ` Eliot Moss
  0 siblings, 1 reply; 24+ messages in thread
From: John Cowan @ 2016-04-13 13:11 UTC (permalink / raw)
  To: cygwin

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        cowan@ccil.org
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13 10:02 ` Gerrit Haase
@ 2016-04-13 12:29   ` LLoyd
  2016-04-13 13:11     ` John Cowan
  0 siblings, 1 reply; 24+ messages in thread
From: LLoyd @ 2016-04-13 12:29 UTC (permalink / raw)
  To: cygwin

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 <gerrit.haase@gmail.com> 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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
  2016-04-13  5:23 John Cowan
@ 2016-04-13 10:02 ` Gerrit Haase
  2016-04-13 12:29   ` LLoyd
  0 siblings, 1 reply; 24+ messages in thread
From: Gerrit Haase @ 2016-04-13 10:02 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Conflict between Cygwin 1.7 and Ubuntu for Windows 14316
@ 2016-04-13  5:23 John Cowan
  2016-04-13 10:02 ` Gerrit Haase
  0 siblings, 1 reply; 24+ messages in thread
From: John Cowan @ 2016-04-13  5:23 UTC (permalink / raw)
  To: cygwin

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        cowan@ccil.org
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-04-18 17:14 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 17:32 Conflict between Cygwin 1.7 and Ubuntu for Windows 14316 KARL BOTTS
  -- strict thread matches above, loose matches on Subject: below --
2016-04-15  0:56 KARL BOTTS
2016-04-15  1:04 ` John Cowan
2016-04-13  5:23 John Cowan
2016-04-13 10:02 ` Gerrit Haase
2016-04-13 12:29   ` LLoyd
2016-04-13 13:11     ` John Cowan
2016-04-13 13:36       ` Eliot Moss
2016-04-13 15:44         ` John Cowan
2016-04-13 16:22           ` Gerrit Haase
2016-04-14  9:12             ` Evgeny Grin
2016-04-14  9:35               ` Evgeny Grin
2016-04-15  8:49               ` Gerrit Haase
2016-04-15 11:38                 ` Corinna Vinschen
2016-04-16 18:54                   ` Evgeny Grin
2016-04-18 13:26                   ` Gerrit Haase
2016-04-18 17:14                     ` Gerrit Haase
2016-04-16 18:58                 ` Evgeny Grin
2016-04-15  0:51             ` John Cowan
2016-04-15  8:47               ` Gerrit Haase
2016-04-15 16:23                 ` John Cowan
2016-04-16 12:50                   ` Matt Smith
2016-04-13 22:35           ` Andrey Repin
2016-04-14  8:17         ` Evgeny Grin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).