www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
Date: | Thu, 30 Apr 2009 16:30:54 -0500 (CDT) |
From: | Tim McDaniel <tmcd AT panix DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | I'd like to have an unreadable file |
Message-ID: | <Pine.NEB.4.64.0904301620510.20542@panix2.panix.com> |
MIME-Version: | 1.0 |
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 |
I'd like to test a script by giving it an unreadable file as an argument. I usually log in as a user, but one that's in the Administrators group. I made the file (a text file containing just "hello") owned by user Administrator with absolutely no permissions for anyone else. In Windows Explorer, when running as Administrator, it says that mymachine\tmcdaniel has no permission on the file at all -- I can't even view permissions as tmcdaniel. In cmd, I get c:\home\tmcdaniel>type noperm Access is denied. c:\home\tmcdaniel>CACLS noperm c:\home\tmcdaniel\noperm Access is denied. though I can see some information in other ways: c:\home\tmcdaniel>attrib noperm A C:\home\tmcdaniel\noperm c:\home\tmcdaniel>dir noperm ... 04/30/2009 02:47 PM 6 noperm 1 File(s) 6 bytes But Cygwin lets me see it just fine. $ cd $ cat noperm hello and I can see the contents in vi also. So - how do I manipulate a file so that only the owner user can do anything with it, even in Cygwin, even if that owner user is in the Administrators group? - how is it that Cygwin gives more permission than Windows? I am using the latest Cygwin, just updated a few hours ago. Please let me know if you need more information. -- Tim McDaniel, tmcd AT panix DOT com -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |