Filemode change by windows applications
Eliot Moss
moss@cs.umass.edu
Wed Mar 28 14:50:00 GMT 2018
On 3/28/2018 10:40 AM, Eliot Moss wrote:
> On 3/28/2018 10:11 AM, Andrey Repin wrote:
>
>>> and is there anything I can do to prevent windows
>>> applications from setting the execute bit on my files?
>>
>> No, and you will be unable to use Windows associations, if you clear execute bit
>> on documents.
>
> Interesting that you think so, Andrey. I just tested this on my Windows 10
> Surface Book. I used Windows Explorer to navigate to a folder where I had
> cleared the x bits from a .docx file (setting mode to 660 with chmod in
> Cygwin), and clicking on the file opened Word on the file just fine. Maybe
> this behavior is dependent on some other things as well?
Here is getfacl output for the file in question:
# file: Progress Letters S16.docx
# owner: moss
# group: moss
user::rw-
group::---
group:SYSTEM:r-x #effective:r--
group:Cygwin:rwx #effective:rw-
mask:rw-
other:---
So there are underlying x bits of some kind, but Cygwin does display
mode 660 via ls -l (for example).
Still, we entirely agree that there is not really a way to prevent a
Windows program from setting the x bits. Here is getfacl from another
file in the same folder, reflecting how Word sets the permissions:
# file: Progress Letters S17.docx
# owner: moss
# group: moss
# flags: -s-
user::rwx
group::---
group:SYSTEM:r-x
group:Cygwin:rwx
mask:rwx
other:r-x
I think the key difference is "mask".
Regards - Eliot
--
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
More information about the Cygwin
mailing list