public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: SMBFS mount's file cannot be made executable
Date: Thu, 15 Aug 2019 02:59:00 -0000	[thread overview]
Message-ID: <98680ad1-fac9-123e-35c4-c55b7139f75f@SystematicSw.ab.ca> (raw)
In-Reply-To: <BN6PR09MB14090CCC3D36B48425650A55A5AC0@BN6PR09MB1409.namprd09.prod.outlook.com>

On 2019-08-14 19:40, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
>> You can often figure permissions problems

> I already figured where the problem was, in how cygwin convers (or, actually 
> doesn't) the UNIX's "x" bit into the native DAC for the underlying filesystem
> (to store as, again, "x" in the Linux share). 
> Missing that DACL, SMBD returns "Access denied" for an attempt to execute the
> .exe file.>
> I don't think that any of the requested output is of any help or indication, 
> rather than to actually show that the execute permission is missing.
> 
> $ /usr/lib/csih/getVolInfo /cygdrive/z
> Device Type        : 7
> Characteristics    : 10
> Volume Name        : <home>
> Serial Number      : 3112497429
> Max Filenamelength : 255
> Filesystemname     : <NTFS>
> Flags              : 1006f
>   FILE_CASE_SENSITIVE_SEARCH  : TRUE
>   FILE_CASE_PRESERVED_NAMES   : TRUE
>   FILE_UNICODE_ON_DISK        : TRUE
>   FILE_PERSISTENT_ACLS        : TRUE
>   FILE_FILE_COMPRESSION       : FALSE
>   FILE_VOLUME_QUOTAS          : TRUE
>   FILE_SUPPORTS_SPARSE_FILES  : TRUE
>   FILE_SUPPORTS_REPARSE_POINTS: FALSE
>   FILE_SUPPORTS_REMOTE_STORAGE: FALSE
>   FILE_VOLUME_IS_COMPRESSED   : FALSE
>   FILE_SUPPORTS_OBJECT_IDS    : TRUE
>   FILE_SUPPORTS_ENCRYPTION    : FALSE
>   FILE_NAMED_STREAMS          : FALSE
>   FILE_READ_ONLY_VOLUME       : FALSE
>   FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
>   FILE_SUPPORTS_TRANSACTIONS  : FALSE
> 
> $ pwd
> /cygdrive/z
> 
> $ gcc hello.c
> 
> $ /usr/lib/csih/getVolInfo /cygdrive/z/a.exe
> Device Type        : 7
> Characteristics    : 10
> Volume Name        : <home>
> Serial Number      : 3112497429
> Max Filenamelength : 255
> Filesystemname     : <NTFS>
> Flags              : 1006f
>   FILE_CASE_SENSITIVE_SEARCH  : TRUE
>   FILE_CASE_PRESERVED_NAMES   : TRUE
>   FILE_UNICODE_ON_DISK        : TRUE
>   FILE_PERSISTENT_ACLS        : TRUE
>   FILE_FILE_COMPRESSION       : FALSE
>   FILE_VOLUME_QUOTAS          : TRUE
>   FILE_SUPPORTS_SPARSE_FILES  : TRUE
>   FILE_SUPPORTS_REPARSE_POINTS: FALSE
>   FILE_SUPPORTS_REMOTE_STORAGE: FALSE
>   FILE_VOLUME_IS_COMPRESSED   : FALSE
>   FILE_SUPPORTS_OBJECT_IDS    : TRUE
>   FILE_SUPPORTS_ENCRYPTION    : FALSE
>   FILE_NAMED_STREAMS          : FALSE
>   FILE_READ_ONLY_VOLUME       : FALSE
>   FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
>   FILE_SUPPORTS_TRANSACTIONS  : FALSE
> 
> $ ls -dl /cygdrive/z/a.exe
> -rw-rw-r--+ 1 lavr cppcore 157753 Aug 14 21:30 /cygdrive/z/a.exe
> 
> $ getfacl /cygdrive/z/a.exe
> # file: /cygdrive/z/a.exe
> # owner: lavr
> # group: cppcore
> user::rw-
> user:lavr:rw-
> group::r--
> group:cppcore:r--
> mask::rw-
> other::r--
> 
> $ icacls `cygpath -w /cygdrive/z/a.exe`
> Z:\a.exe S-1-22-1-4640:(R,W)
>          S-1-22-2-5333:(R)
>          S-1-22-2-5333:(R)
>          S-1-22-1-4640:(R,W)
>          Everyone:(R)
> 
> Successfully processed 1 files; Failed processing 0 files

Prerequisite for +x is DACL and masks allowing +x on normal file system
directories and executables, as Cyggwin is emulating POSIX D/ACLs using Windows
D/ACLs:

drwxrwxr-x+ 1 SYSTEM SYSTEM 0 Aug 14 18:40 .

# file: .
# owner: SYSTEM
# group: SYSTEM
user::rwx
user:$USER:rwx
group::r-x
group:Administrators:rwx
group:$GROUP:r-x
mask::rwx
other::r-x
default:user::rwx
default:user:$USER:rwx
default:group::---
default:group:Administrators:rwx
default:mask::rwx
default:other::r-x

. NULL SID:(DENY)(Rc,S,REA,WEA,X,DC)
  NT AUTHORITY\SYSTEM:(F)
  $HOSTNAME\$USER:(RX,W,DC)
  NT AUTHORITY\SYSTEM:(RX)
  BUILTIN\Administrators:(RX,W,DC)
  BUILTIN\$GROUP:(RX)
  Everyone:(RX)
  NULL SID:(OI)(CI)(IO)(DENY)(Rc,S,REA,WEA,X,DC)
  CREATOR OWNER:(OI)(CI)(IO)(F)
  $HOSTNAME\$USER:(OI)(CI)(IO)(RX,W,DC)
  CREATOR GROUP:(OI)(CI)(IO)(Rc,S,RA)
  BUILTIN\Administrators:(OI)(CI)(IO)(RX,W,DC)
  CREATOR GROUP:(OI)(CI)(IO)(DENY)(S,RD,REA,X)
  Everyone:(OI)(CI)(IO)(RX)

Successfully processed 1 files; Failed processing 0 files

-rwxr-xr-x+ 1 $USER $GROUP 158443 Aug  3  2018 test.exe
# file: test.exe
# owner: $USER
# group: $GROUP
user::rwx
group::r-x
group:SYSTEM:rwx        #effective:r-x
group:Administrators:rwx        #effective:r-x
mask::r-x
other::r-x

test.exe NULL SID:(DENY)(Rc,S,REA,X,DC)
         $HOSTNAME\$USER:(F)
         BUILTIN\$GROUP:(RX)
         NT AUTHORITY\SYSTEM:(RX,W)
         BUILTIN\Administrators:(RX,W)
         Everyone:(RX)

Successfully processed 1 files; Failed processing 0 files

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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

  reply	other threads:[~2019-08-15  2:59 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  1:40 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15  2:59 ` Brian Inglis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-15  2:00 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15  9:21 ` L A Walsh
2019-08-15  9:23 ` L A Walsh
2019-08-21  7:12   ` Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-14 20:39 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15  1:31 ` Ken Brown
2019-08-14 14:07 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15  1:28 ` Ken Brown
2019-08-14  4:24 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-14 11:22 ` Ken Brown
2019-08-14 22:58   ` Brian Inglis
2019-08-14  0:53 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-14  2:36 ` Ken Brown
2019-08-14 16:59 ` Achim Gratz
2019-08-12 19:05 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-13  8:28 ` KAVALAGIOS Panagiotis (EEAS-EXT)
     [not found] ` <704986a5a4ab41709eb963dcd23887b1@BELBRU-EXMP101.eeas.europa.eu>
2019-08-13 12:27   ` Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-13 18:34     ` Achim Gratz
2019-08-13 18:35     ` Andrey Repin
2019-08-13 23:19       ` Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-14 20:05         ` Andrey Repin
2019-08-08 15:42 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2024-11-08 11:51 ` Takashi Yano
2024-11-08 13:11   ` Corinna Vinschen
2024-11-11 10:31     ` Takashi Yano
2024-11-11 10:31       ` Takashi Yano via Cygwin
2024-11-11 10:56       ` Corinna Vinschen
2024-11-11 10:56         ` Corinna Vinschen via Cygwin
2024-11-11 11:19         ` Takashi Yano
2024-11-11 11:19           ` Takashi Yano via Cygwin
2024-11-11 11:32           ` Takashi Yano
2024-11-11 11:32             ` Takashi Yano via Cygwin
2024-11-11 11:40             ` Takashi Yano
2024-11-11 11:40               ` Takashi Yano via Cygwin
2024-11-11 12:03               ` Corinna Vinschen
2024-11-11 12:03                 ` Corinna Vinschen via Cygwin
2024-11-11 12:19                 ` Takashi Yano
2024-11-11 12:19                   ` Takashi Yano via Cygwin
2024-11-11 13:35                   ` Corinna Vinschen
2024-11-11 13:35                     ` Corinna Vinschen via Cygwin
2024-11-11 19:29                     ` Takashi Yano
2024-11-11 19:29                       ` Takashi Yano via Cygwin
2024-11-12  8:54                       ` Takashi Yano
2024-11-12 11:56                         ` Corinna Vinschen
2024-11-13  9:17                           ` Takashi Yano
2024-11-13 15:10                             ` Bill Stewart
2024-11-13 15:37                               ` Takashi Yano
2024-11-13 15:58                                 ` Bill Stewart
2024-11-13 16:08                                   ` Takashi Yano
2024-11-15 15:21                                     ` Takashi Yano
2024-11-18 16:26                                       ` Corinna Vinschen
2024-11-19  8:58                                         ` Takashi Yano
2024-11-19 20:54                                           ` Corinna Vinschen
2024-12-07 23:13                                             ` Takashi Yano
2024-12-08  7:57                                               ` Takashi Yano
2024-12-09 11:11                                               ` Corinna Vinschen
2024-11-12 11:31                       ` Corinna Vinschen
2024-11-11 11:51           ` Takashi Yano
2024-11-11 11:51             ` Takashi Yano via Cygwin
2024-11-11 11:59           ` Corinna Vinschen
2024-11-11 11:59             ` Corinna Vinschen via Cygwin
2024-11-11 12:25             ` Takashi Yano
2024-11-11 12:25               ` Takashi Yano via Cygwin
2024-11-11 13:00             ` Takashi Yano
2024-11-11 13:00               ` Takashi Yano via Cygwin
2024-11-11 13:18               ` Corinna Vinschen
2024-11-11 13:18                 ` Corinna Vinschen via Cygwin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98680ad1-fac9-123e-35c4-c55b7139f75f@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).