X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=Ca9SCsPv6QR+P0+e 4jU/ctTNFlZ55wgfaB9HVlW+/DHX//2fziziN+hBVxuu1s08EmBiIkFyFKP8L6Jw K27OYmCJjqXMsX3U4LfOGGCeJpRwx0VZPU3/Zhnv7BdN64YSaVC997lzSiS+4/Q0 CvjT9Ak/iavXNM/rl05lmWniUEs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=2DoKl3UH8QGnWXoCcSdJXb W1wZc=; b=bgnOSmkwXfx49nZ1Nl9wz98fNdWhhgytBZkXgs0UTzNIBqkn9yRMhP FTFuL8IGte8JtMARerdSp8fZ8rD7+5AvNOG0eINbjTc3S6FDAtLg3dFJWErAeMOa sVvdj4HlEFzJ+ochrBAvG89wq+Fn7GyN9mFuXb6ZI5d1Eo/DbIEsE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*yandex.ru, yandexru, acl, UD:yandex.ru X-HELO: forward100p.mail.yandex.net Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@yandex.ru Date: Wed, 28 Mar 2018 19:14:04 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <944079553.20180328191404@yandex.ru> To: Eliot Moss , cygwin AT cygwin DOT com Subject: Re: Filemode change by windows applications In-Reply-To: <7f3fe599-eda0-2c97-b344-687b606615eb@cs.umass.edu> References: <518060803 DOT 20180328171118 AT yandex DOT ru> <9965f4cf-566c-6d20-61b7-ce43580935aa AT cs DOT umass DOT edu> <7f3fe599-eda0-2c97-b344-687b606615eb AT cs DOT umass DOT edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id w2SGKRHK018816 Greetings, Eliot Moss! > 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:--- If you ANSOLUTELY remove execute bit (this is often happens on samba shares managed by POSIX ACL for example, when you create file with POSIX tools before Samba have a say about permissions), things break hard. > 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". Cygwin way of treating Windows ACL's is still kind of mystery to me. I know they works… somehow. But I prefer to stay away from them, where possible. I need interoperability over "zealous POSIX compatibility". -- With best regards, Andrey Repin Wednesday, March 28, 2018 19:10:43 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