This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: file attributes: cygwin (ls, chmod, chown, chgrp) versus XP


Michael R. Wolf wrote:
I'm very familiar with the Unix filesystem, and the commands to change
and display attributes.  I've been using cygwin for years, but have yet
to understand the XP permissions and how they correlate to how cygwin and
XP tools manipulate attributes.


I've noticed that the ls(1) output is different if I create a file with a
cygwin utility or with an XP utility. Specifically:
1. What does the "+" mean in the 11th column after the standard 1-column type and 9-column permission fields? 2. Why are default permissions different if the file
is created with cygwin and XP? I understand that cywing will try to
create them with 666, modulated by the umask of 0022, yeilding a default
of 644, but how the heck does XP come up with "700+" (my interpretation
of "rwx------+")?

'+' means there are permissions that don't "fit" into the traditional user/ group/others categories. Windows uses ACLs. Use 'getfacl', 'setfacl', and/or 'cacls' to access them.

-rw-r--r-- 1 michael 0 Sep 3 00:33 created_by_bash_io_redirect -rwx------+ 1 michael 18 Sep 3 00:32 created_by_emacs -rwx------+ 1 michael 17 Sep 3 00:31 created_by_notepad -rw-r--r-- 1 michael 0 Sep 3 00:31 created_by_touch

In addition, I can't get group information to show up in ls(1) output.

You mean the name? Do you have a '/etc/group' file? Does it have your current groups in it? If not, (re)generate it with 'mkgroup -l [-d]' (or whichever options make the most sense in your environment).

The -G flag to suppress it has no effect, and seems to always be active.

WJFFM.


It seems like these would be an important topics to reference in the
ls(1) and chmod(1) man pages, and also in the (seemingly outdated)
documentation of File Permissions
(http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-files).

<http://www.cygwin.com/ml/cygwin/2007-09/msg00459.html>


As for the UG, perhaps

<http://cygwin.com/1.7/cygwin-ug-net.html>

is more to your liking?  I'd recommend reading the entire NT security
section and reading up in the MSDN on the NT(FS) security model.  This
should answer allot of questions for you (and probably generate some new
ones. ;-) )

Have there been significatnt changes to cygwin since NT to accomodate XP?
I don't even know if the NT and XP filesystems are similar enough that I
can rely on documentation that discusses NT vs cygwin.

All Windows platforms since W2K are NT-based (NT 3.x and 4.x are other previous NT-based platforms). You can assume that when the documentation refers to NT, it's referring to current Windows operating systems. As for file-systems, there are multiple options here. I believe you're implying that you're interested in NTFS-formatted file-systems. Everything I said about the documentation and NT holds true for NTFS.


-- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746

_____________________________________________________________________

A: Yes.
Q: Are you sure?
A: Because it reverses the logical flow of conversation.
Q: Why is top posting annoying in email?

-- 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]