tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Brewer, Edward" <BREWERE@OD.NIH.GOV>
Subject: ADDENDUM: ACL question
Date: Wed, 24 Jul 2002 15:22:27 -0400	[thread overview]
Message-ID: <7B386924C5CAD0428322085D0F0F766F0163B53B@ODEXC4> (raw)



Admins,

	As usual there came an answer after I figured out my original
question, that summed it all up and helped craft a better way to accomplish
what I want.

Email correspondence from  Ann Majeske 

"Brewer, Edward" wrote:
 
 Ann,
 
         Thanks,  I found it also in the Tru64 5.1 manual.   I was
attempting
 to use acl's to force all new files created by the owner of the directory
to
 read only.
 Example
 drwxr-x---  bogus dba  bogus
 
 I then set
 setacl -d -u user:bogus:r-- bogus
 setacl -d -u group:dba:rw- bogus
 
 then cd to bogus
 there I copied a file from /var/tmp/ called before.txt
 -rw-r--r--  root system    before.txt
 
 it resulted with what I posted...
 
 thanks for your reply,
Lee

From ann:

One tricky thing about the default ACLs is that they are required
by the specification to contain the three base entries (i.e. the
permission bits) in addition to the entries that you set specifically.
If you don't supply these entries they default to the current
permission bits of the directory, which probably isn't what you
want files to inherit!  So, if you set the default ACL as follows
it will probably do what you want:
  setacl -d -u user::r--,group::r--,other::r-- bogus
Of course, the owner of the file always has the capability of 
changing the ACL (as well as the permission bits), so this will
only work if the owner doesn't decide to go change the ACL or 
the permission bits on his own.  Also, remember that in UNIX the
ability to delete a file is based on the write permission of the
directory containing the file, not the file itself.  So if a user
has permission to create a file in a directory he also has 
permission to delete any file in that directory, even if the file 
is set read-only.

Ann


Summary:

I am very use to the old unix permission scheme, so with ACL's I miss the
forest for the trees...  
I never thought of just using
setacl -d -u user::r--
I thought user::, group::, and other:: were only managed by the old scheme.

Thanks again,

Lee Brewer





                 reply	other threads:[~2002-07-24 19:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox