delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/11/01/14:05:29

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_20,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Oleksandr Gavenko <gavenkoa AT gmail DOT com>
Subject: Help with ACL and POSIX permissions for external flash/HD.
Date: Sun, 30 Oct 2011 23:24:42 +0200
Lines: 68
Message-ID: <j8kfav$csp$1@dough.gmane.org>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

I have problem with permission (files stand non-readable sometimes) on
host when "rsync" or "hg clone/pull" done on external drive
on another host.

I read http://www.cygwin.com/cygwin-ug-net/ntsec.html
partially understand text but don't know how to resolve
my problem...

 From manual:

   To use Windows security correctly, Cygwin depends on the files
   /etc/passwd and /etc/group

So if I carry external storage from one host to another
does second Cygwin stop understand permission on external storage
correctly?

I would like to see if all Cygwin operation set 666 permission
for files and 777 for directories for external drive and
don't set any host specific owners so I always can access to files.

It is possible that Cygwin set owners only from well knows SIDs?
Like S-1-1-0 (everyone), S-1-5-32-544 (Administrators)
so this IDs valid on any Windows host.

I try:

   $ mount -o noacl h:  /mnt
   $ mount
C:/opt/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/opt/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/opt/cygwin on / type ntfs (binary,auto)
H: on /mnt type ntfs (binary,noacl,user)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)

  $ umask 0111
   $ touch foo
   $ pwd
   /mnt
   $ mkdir dir
   $ touch dir/file

   $ ls -ld foo dir dir/file
   drw-r--r-- 1 user passwd/group_GID_clash(513/10513) 0 окт 30 23:05 dir
   -rw-r--r-- 1 user passwd/group_GID_clash(513/10513) 0 окт 30 23:05 
dir/file
   -rw-r--r-- 1 user passwd/group_GID_clash(513/10513) 0 окт 30 23:04 foo

   $ icacls foo
   foo Все:(I)(F)

   $ icacls dir
   dir Все:(I)(F)

   $ icacls dir/file
   dir/file desktop\user:(F)
            BUILTIN\Администраторы:(F)
            NT AUTHORITY\система:(F)

Look fine, is that way solve my problem?

Is it right to update /etc/fstab to:

   h: /cygdrive/h ntfs binary,noacl,user 0 0

How can I set umask? In .bashrc? What if I run
Cygwin program from cmd?


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019