Web lists-archives.com

Re: Filemode change by windows applications

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
group:SYSTEM:r-x                        #effective:r--
group:Cygwin:rwx                        #effective:rw-

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-

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