I'd like to have an unreadable file

Tim McDaniel tmcd@panix.com
Thu Apr 30 21:48:00 GMT 2009


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@panix.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/



More information about the Cygwin mailing list