niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Solaris
setfacl: What's wrong with this?
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Chuck
*nix forums Guru Wannabe


Joined: 01 Mar 2005
Posts: 277

PostPosted: Thu Feb 03, 2005 1:45 pm    Post subject: setfacl: What's wrong with this? Reply with quote

I'm new to ACLs. Can someone explain why I'm getting the error below
from setfacl? The current directory is owned by psoft. I want to add an
ACL to the current directory so that only jsmith can add files to it. I
also want psoft to be able to read and delete that file but not change it.

$ ls -ld .
drwxr-xr-x+ 2 psoft psoft 512 Feb 3 09:28 ./

$ getfacl .

# file: .
# owner: psoft
# group: psoft
user::rwx
user:psoft:r-x #effective:r-x
group::r-x #effective:r-x
mask:r-x
other:r-x
default:user::rw-
default:group::---
default:other:---

$ setfacl -m d:u:jsmith:rw- .
Missing user/group owner, other, mask entry
aclcnt 9, file .
--
To reply by email remove "_nospam"
Back to top
Thomas Maier-Komor
*nix forums Guru


Joined: 20 Feb 2005
Posts: 508

PostPosted: Thu Feb 03, 2005 2:56 pm    Post subject: Re: setfacl: What's wrong with this? Reply with quote

Chuck wrote:
Quote:
I'm new to ACLs. Can someone explain why I'm getting the error below
from setfacl? The current directory is owned by psoft. I want to add an
ACL to the current directory so that only jsmith can add files to it. I
also want psoft to be able to read and delete that file but not change it.

$ ls -ld .
drwxr-xr-x+ 2 psoft psoft 512 Feb 3 09:28 ./

$ getfacl .

# file: .
# owner: psoft
# group: psoft
user::rwx
user:psoft:r-x #effective:r-x
group::r-x #effective:r-x
mask:r-x
other:r-x
default:user::rw-
default:group::---
default:other:---

$ setfacl -m d:u:jsmith:rw- .
Missing user/group owner, other, mask entry
aclcnt 9, file .

try

$ setfacl -a d:u:jsmith:rw- .

but I guess, what you want cannot be done with ACLs...
Back to top
brandysimon@gmail.com
*nix forums beginner


Joined: 25 Feb 2005
Posts: 15

PostPosted: Thu Feb 03, 2005 3:00 pm    Post subject: Re: setfacl: What's wrong with this? Reply with quote

you are attempting to use default entry ( d:u:jsmith:rw- )
to use default you must also specify default for group and mask, cannot
just do user default.
setfacl -m d:u:jsmith:rw-,d:u::r-x,d:g::r-x,d:m:r-x .
Back to top
Peter C. Tribble
*nix forums beginner


Joined: 23 Feb 2005
Posts: 23

PostPosted: Thu Feb 03, 2005 4:04 pm    Post subject: Re: setfacl: What's wrong with this? Reply with quote

In article <36erorF515hptU1@individual.net>,
Chuck <skilover_nospam@softhome.net> writes:
Quote:
I'm new to ACLs. Can someone explain why I'm getting the error below
from setfacl? The current directory is owned by psoft. I want to add an
ACL to the current directory so that only jsmith can add files to it. I
also want psoft to be able to read and delete that file but not change it.

$ ls -ld .
drwxr-xr-x+ 2 psoft psoft 512 Feb 3 09:28 ./

$ getfacl .

# file: .
# owner: psoft
# group: psoft
user::rwx
user:psoft:r-x #effective:r-x
group::r-x #effective:r-x
mask:r-x
other:r-x
default:user::rw-
default:group::---
default:other:---

$ setfacl -m d:u:jsmith:rw- .
Missing user/group owner, other, mask entry
aclcnt 9, file .

You haven't supplied any entries for the user/group owner, other, mask.

When setting up a default ACL, you need to supply all the fields.

setfacl -m u:jsmith:rwx,m:rwx .

to allow jsmith to write to the directory, and

setfacl -m d:u::rwx,d:g:---,dSurprised:---,d:m:rwx,d:u:psoft:r-- .

to set the defaults.


--
-Peter Tribble
MRC Rosalind Franklin Centre for Genomics Research
http://www.rfcgr.mrc.ac.uk/~ptribble/ - http://ptribble.blogspot.com/
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 2:04 am | All times are GMT
navigation Forum index » *nix » Solaris
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts OT: whats wrong with my CSS padding/margin positioning Roman PHP 1 Wed Jul 19, 2006 1:12 pm
No new posts Calling functions with the wrong parameters Kenneth Brody C 7 Tue Jul 18, 2006 6:17 pm
No new posts Creating a new file something going wrong riderchap@gmail.com Perl 4 Tue Jul 18, 2006 3:30 pm
No new posts anything wrong? jarod C++ 2 Tue Jul 18, 2006 10:45 am
No new posts WARNING: Hard link count is wrong for /selinux amit Setup 8 Mon Jul 17, 2006 7:21 pm

Loans and Credit Cards | Guitar Lessons | Fish Tank Help | Problem Mortgage | Credit Cards
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1411s ][ Queries: 16 (0.0544s) ][ GZIP on - Debug on ]