delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/04/04:55:36

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 4 Jul 2008 10:55:28 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: chmod permission denied on windows 2008
Message-ID: <20080704085528.GH10582@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <E0174AD446AE4AF786ED30C69C9529CC AT multiplay DOT co DOT uk> <20080703125758 DOT GC10582 AT calimero DOT vinschen DOT de> <9519CD6573CA4B378AB436808C330A8C AT multiplay DOT co DOT uk>
MIME-Version: 1.0
In-Reply-To: <9519CD6573CA4B378AB436808C330A8C@multiplay.co.uk>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Jul  3 23:22, Steven Hartland wrote:
> ----- Original Message ----- From: "Corinna Vinschen"
>> You could run this under strace and see what Win32 error message
>> you get.  It could be helpful.
>
> Below is the full strace of this, but I think the issue lies where
> you suggested looking at:-
> [log]
>  716   22555 [main] chown 2524 seterrno_from_win_error: 
> /ext/build/netrel/src/cygwin-1.5.25-15/winsup/cygwin/sec_helper.cc:422 
> windows error 1300
>  104   22659 [main] chown 2524 geterrno_from_win_error: unknown windows 
> error 1300, setting errno to 13
>   95   22754 [main] chown 2524 __set_errno: void 
> seterrno_from_win_error(const char*, int, DWORD):310 val 13
>   94   22848 [main] chown 2524 set_privilege: -1 = set_privilege ((token 
> 138) SeRestorePrivilege, 1)
> 2513   25361 [main] chown 2524 seterrno_from_win_error: 
> /ext/build/netrel/src/cygwin-1.5.25-15/winsup/cygwin/sec_helper.cc:422 
> windows error 1300
>   93   25454 [main] chown 2524 geterrno_from_win_error: unknown windows 
> error 1300, setting errno to 13
>   82   25536 [main] chown 2524 __set_errno: void 
> seterrno_from_win_error(const char*, int, DWORD):310 val 13
>  103   25639 [main] chown 2524 set_privilege: -1 = set_privilege ((token 
> 138) SeBackupPrivilege, 1)
>  103   25742 [main] chown 2524 set_privilege: 1 = set_privilege ((token 
> 138) SeChangeNotifyPrivilege, 1)
> [/log]

That's weird.  Cygwin always enables the backup and restore privileges
if they are available.  The whoami printout in your previous mail
shows that the privilege is in the token.  But the above code shows
that the AdjustTokenPrivileges() call for the backup and restore
rights both fail with ERROR_NOT_ALL_ASSIGNED.  The problem is that
there's no indication why it fails.  Per MSDN this should only happen
if the privilege is not in the token.

Bottom line is, there's nothing Cygwin can do about this.  Did you
look into the security event long?  Maybe there's a hint why this
fails.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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