This is the mail archive of the
cygwin
mailing list for the Cygwin project.
I'd like to have an unreadable file
- From: Tim McDaniel <tmcd at panix dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 30 Apr 2009 16:30:54 -0500 (CDT)
- Subject: I'd like to have an unreadable file
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/