public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* After cygwin update, all files are created with +x flag
@ 2015-10-03 10:10 Michal Wysocki
  2015-10-03 12:46 ` Ken Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Wysocki @ 2015-10-03 10:10 UTC (permalink / raw)
  To: cygwin

Hi

While installing some packages I've accidentally updated my whole cygwin
from 1.7.29 to 2.1.1.

From what I've found, around 1.7.34/35 there was some big change in ACL
handling.

Now, all my files and directories created in old cygwin (kernel build tree,
cygwin /etc folder etc.) have totally messed up permissions. Essentially
all files have 0774.

Also all new files created by touch, scripts, compilers etc., end up with
executable flag set:

$ touch test
$ getfacl -a test
# file: test
# owner: Misiek
# group: None
user::rw-
group::r--
group:Uzytkownicy uwierzytelnieni:rwx // Authenticated users
group:SYSTEM:rwx
group:Administratorzy:rwx // Admins
group:Uzytkownicy:r-x // Users
mask:rwx
other:r--
$ ls -l test
-rwxrwxr--+ 1 Misiek None 0 10-03 11:33 test


Of course everything still works, but is it new expected behavior? I'm not
sure if I really understand windows ACL, but this change in how cygwin
handles them is really disruptive...

Is there a tool / way to convert permissions on all my work folders/files,
so they are interpreted by new cygwin the same way as old one did?

Thanks
Michal


--
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] 6+ messages in thread

* Re: After cygwin update, all files are created with +x flag
  2015-10-03 10:10 After cygwin update, all files are created with +x flag Michal Wysocki
@ 2015-10-03 12:46 ` Ken Brown
  2015-10-03 16:55   ` cyg Simple
  2015-10-03 18:29   ` Michal Wysocki
  0 siblings, 2 replies; 6+ messages in thread
From: Ken Brown @ 2015-10-03 12:46 UTC (permalink / raw)
  To: cygwin

On 10/3/2015 6:07 AM, Michal Wysocki wrote:
> Hi
>
> While installing some packages I've accidentally updated my whole cygwin
> from 1.7.29 to 2.1.1.
>
>  From what I've found, around 1.7.34/35 there was some big change in ACL
> handling.
>
> Now, all my files and directories created in old cygwin (kernel build tree,
> cygwin /etc folder etc.) have totally messed up permissions. Essentially
> all files have 0774.
>
> Also all new files created by touch, scripts, compilers etc., end up with
> executable flag set:
>
> $ touch test
> $ getfacl -a test
> # file: test
> # owner: Misiek
> # group: None
> user::rw-
> group::r--
> group:Uzytkownicy uwierzytelnieni:rwx // Authenticated users
> group:SYSTEM:rwx
> group:Administratorzy:rwx // Admins
> group:Uzytkownicy:r-x // Users
> mask:rwx
> other:r--
> $ ls -l test
> -rwxrwxr--+ 1 Misiek None 0 10-03 11:33 test
>
>
> Of course everything still works, but is it new expected behavior? I'm not
> sure if I really understand windows ACL, but this change in how cygwin
> handles them is really disruptive...
>
> Is there a tool / way to convert permissions on all my work folders/files,
> so they are interpreted by new cygwin the same way as old one did?

setfacl -b

See https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working .

Ken


--
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] 6+ messages in thread

* Re: After cygwin update, all files are created with +x flag
  2015-10-03 12:46 ` Ken Brown
@ 2015-10-03 16:55   ` cyg Simple
  2015-10-06 20:50     ` Ken Brown
  2015-10-03 18:29   ` Michal Wysocki
  1 sibling, 1 reply; 6+ messages in thread
From: cyg Simple @ 2015-10-03 16:55 UTC (permalink / raw)
  To: cygwin

On 10/3/2015 8:46 AM, Ken Brown wrote:
> 
> See https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working .
> 

Why would a user such as the OP look for this id in the FAQ as an answer
to his problem?  Shouldn't there be a section for "ACL and File
Permissions Wrong After Upgrade"?  Sure it could point to the SSH entry
but it is a different question.

-- 
cyg 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] 6+ messages in thread

* Re: After cygwin update, all files are created with +x flag
  2015-10-03 12:46 ` Ken Brown
  2015-10-03 16:55   ` cyg Simple
@ 2015-10-03 18:29   ` Michal Wysocki
  2015-10-03 21:50     ` Andrey Repin
  1 sibling, 1 reply; 6+ messages in thread
From: Michal Wysocki @ 2015-10-03 18:29 UTC (permalink / raw)
  To: cygwin

Dnia Sat, 3 Oct 2015 08:46:53 -0400, Ken Brown napisaÂł(a):

> On 10/3/2015 6:07 AM, Michal Wysocki wrote:
> setfacl -b
> See https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working .

Huh, this explanation is really well hidden in FAQ ;)

I've already figured it out, but setfacl -b wasn't a cure in my case.

Cygwin implementation is missing two important options:
-h (do not follow symbolic links)
-R (recursive)

Second one is not a biggie, but this tool simply can't modify cygwin
symlink files (and I have hundreds of them scattered throughout work
folders).

I've fixed my folders by doing a copy of them inside 1.7.29 shell. Old
cygwin automatically created appropriate permissions for every file,
ignoring messy inherited ACL entries that I had in my work folders.   

But there is another catch. Using new cygwin, you can't really create
folders that you intend to use in cygwin via windows explorer (which was
never a problem). They will get ACL entries (inherited from top level
folder C:\ for example) with +x rights, and cygwin will pass these
additional entries to any file created inside that folder.

Well, you get smarter every day ;)

Cheers 
Michal


--
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] 6+ messages in thread

* Re: After cygwin update, all files are created with +x flag
  2015-10-03 18:29   ` Michal Wysocki
@ 2015-10-03 21:50     ` Andrey Repin
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Repin @ 2015-10-03 21:50 UTC (permalink / raw)
  To: Michal Wysocki, cygwin

Greetings, Michal Wysocki!

> But there is another catch. Using new cygwin, you can't really create
> folders that you intend to use in cygwin via windows explorer (which was
> never a problem). They will get ACL entries (inherited from top level
> folder C:\ for example) with +x rights, and cygwin will pass these
> additional entries to any file created inside that folder.

Correction: it was never working right. Now it works better. Even if not the
same way as before.


-- 
With best regards,
Andrey Repin
Sunday, October 4, 2015 00:42:29

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] 6+ messages in thread

* Re: After cygwin update, all files are created with +x flag
  2015-10-03 16:55   ` cyg Simple
@ 2015-10-06 20:50     ` Ken Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Ken Brown @ 2015-10-06 20:50 UTC (permalink / raw)
  To: cygwin

On 10/3/2015 12:55 PM, cyg Simple wrote:
> On 10/3/2015 8:46 AM, Ken Brown wrote:
>>
>> See https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working .
>>
>
> Why would a user such as the OP look for this id in the FAQ as an answer
> to his problem?  Shouldn't there be a section for "ACL and File
> Permissions Wrong After Upgrade"?  Sure it could point to the SSH entry
> but it is a different question.

I've just submitted a patch that adds a question like that:

   https://cygwin.com/ml/cygwin-patches/2015-q4/msg00000.html

Ken

--
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] 6+ messages in thread

end of thread, other threads:[~2015-10-06 20:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03 10:10 After cygwin update, all files are created with +x flag Michal Wysocki
2015-10-03 12:46 ` Ken Brown
2015-10-03 16:55   ` cyg Simple
2015-10-06 20:50     ` Ken Brown
2015-10-03 18:29   ` Michal Wysocki
2015-10-03 21:50     ` Andrey Repin

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