delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/13/23:21:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Jehan <nahor AT bravobrava DOT com>
Newsgroups: gmane.os.cygwin
Subject: Re: Permission denied on a windows share
Date: Sat, 13 Jul 2002 20:20:52 -0700
Lines: 46
Message-ID: <3D30EE14.3060009@bravobrava.com>
References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20020713194509 DOT 02bb9210 AT pop3 DOT cris DOT com>
NNTP-Posting-Host: adsl-64-168-83-170.dsl.snfc21.pacbell.net
Mime-Version: 1.0
X-Trace: main.gmane.org 1026616800 31405 64.168.83.170 (14 Jul 2002 03:20:00 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Sun, 14 Jul 2002 03:20:00 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1a+) Gecko/20020708
X-Accept-Language: en-us, en

Randall R Schulz wrote:

> Jehan,
>
> Move ("mv") doesn't write into files. It manipulates directory entries. 

However, mv has to copy the file when you move it accross filesystems, 
doesn't it? If the file was on the same partition, I would understand 
that it works (cygwin would just ask the filesystem to move the file 
entry from one directory to another). But in my case, the initial file 
is on a local drive while the destination is a share. It must be copied 
somehow.

> Directory permissions and the permissions of the files they contain 
> are not the same thing--they're mostly independent. An unwritable file 
> is still removable (or replaceable) if the directory in which it 
> resides permits writing (to a first approximation, at least).

But if *I* create the file, I should then be able to write to it no?

> Windows permissions are a lot...fancier than Unix's. Cygwin does its 
> best to map permissions between the two models, but in the end, it's 
> Windows' permission scheme that rules the day. Network shares probably 
> complicate the picture, too, but I'm no expert on either Windows' 
> permission scheme nor how network shares interact with it.
>
> This should give you the clues on where to look to solve your problem. 
> Look at the directory's permissions and ownership with "ls -ld" and 
> the files' with "ls -l".

I know (well I think I know) what is going on. This directory belongs to 
the domain user jehan while I'm log as the local user jehan. They are 
two different accounts so have different IDs.
But then, I should not be able to *create* the empty file: the directory 
also belongs to the domain user.
I should not be able to *read* the files: the windows permission show 
them are read/writable only by the domain user.
So cygwin isn't very consistent in it's behavior. It looks like cygwin 
relies on Windows for read permission and file creation but manages the 
write permission itself. That cygwin tries to set the permission to have 
a Unix like behavior ok, but that I don't think it should try to enforce 
them, it's Windows reponsability. So I think there is definitely a bug 
in cygwin in this regard.

    Jehan




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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