This is the mail archive of the
mailing list for the Cygwin project.
Re: cygwin potentially corrupting permissions?
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin at cygwin dot com
- Date: Thu, 24 Sep 2015 15:22:47 -0400
- Subject: Re: cygwin potentially corrupting permissions?
- Authentication-results: sourceware.org; auth=none
- References: <CAGpXXZKUQtAbrQ80VDHZhy0aZtzG+5fDB7bcYz-kwQ3Kgx6ueQ at mail dot gmail dot com> <560366EE dot 5020207 at tlinx dot org> <CAGpXXZJeWs33BJi7qROduZEhTx1pXXXseTbfXu+QP8+cf_r5hQ at mail dot gmail dot com> <56043BA4 dot 7040405 at tlinx dot org> <CAGpXXZLrourgJ39=n4M8kEKeF7tT3fCTafvLaSfZuHh62ffmUA at mail dot gmail dot com>
On 9/24/2015 2:52 PM, Greg Freemyer wrote:
On Thu, Sep 24, 2015 at 2:06 PM, Linda Walsh <email@example.com> wrote:
Greg Freemyer wrote:
I saved your script as "lsacl.txt". Then I used "cp lsacl.txt it" to
make a copy.
The copy is permission denied for reading. Basic ls -l shows no
difference (as expected)
$ ls -l lsacl.sh it
----rwx---+ 1 gaf None 1630 Sep 24 12:05 it
----rwx---+ 1 gaf None 1630 Sep 24 12:00 lsacl.sh
But your script does show a difference:
$ ./lsacl.sh lsacl.sh it
Well user 'gaf' (that's you, from the file perms has no access).
So up front, you are denied before anything happens.
Totally logical, but not accurate. )
I am the owner of both "it" and "lsacl.sh."
For both the user permissions are "---" (why I don't know. I created
lsacl.sh by a simple drag and drop out of firefox.)
I can cat out "lsacl.sh", but not "it".
I know "chmod +rw it" gives me access to the file. The problem is
Windows is creating files with permissions like lsacl.sh routinely on
Then when I do anything to them in cygwin, the permissions are
modified to block my access.
I first noticed this because I was exporting CSV files from excel,
then editing them with vi from cygwin.
On the first edit, all was good. After that, I no longer had
permission to access the file.
- Windows 7 (on 2 different machines) has started using default
permissions that are bad on their face
- cygwin is not properly maintaining the permissions when it manipulates a file
Either way, I would really like a solution that doesn't involve a
manual chmod for every file I create via the normal Windows interface
and which I want to work with it in cygwin.
The problem could be caused by the default ACL on whatever directory
you're working in. You might consider running 'setfacl -b' and/or
'setfacl -k' on that directory. (Run 'setfacl --help' for more
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple