LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-27-2007, 08:00 PM   #1
erat123
Member
 
Registered: Oct 2006
Distribution: Ubuntu
Posts: 69

Rep: Reputation: 16
setfacl


I'm trying to add acl's to my linux permissions. I got the drive re-mounted with the acl's, and everything is working fine there, but well, here's the problem:

i have a directory:
/something/mydir

and i initially set the chmod of /something/mydir to 0700

then, i allow two of my users rwx access to that directory (mydir) using acl's:

setfacl -m u:bob:rwx /something/mydir
setfacl -m u:tom:rwx /something/mydir
setfacl -dm u:bob:rwx /something/mydir
setfacl -dm u:tom:rwx /something/mydir

that works fine, bob and tom are able to add new files and folders, but the problem is, all files (not directories) have rwx attributes, but i want files to only have rw- attributes and directories to have rwx.

does anyone know an answer for this?
 
Old 05-30-2007, 09:55 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I can not recreate the problem you are describing (on a CentOS box, incidentally).

Post the getfacl for one of the files your user created which you think he has rwx permissions for. e.g.

Code:
[helen@troy acl-test]$ getfacl test-file 
# file: test-file
# owner: helen
# group: helen
user::rw-
user:helen:rwx                  #effective:rw-
group::r-x                      #effective:r--
mask::rw-
other::r--
(Notice the '#effective:rw-' portion to the right. Did you actually have one of the users try executing a file he created?)
 
Old 05-30-2007, 11:16 PM   #3
erat123
Member
 
Registered: Oct 2006
Distribution: Ubuntu
Posts: 69

Original Poster
Rep: Reputation: 16
I've been doing some more research, or rather, learning on this, and I understand it much better now. I think I answered my own question. But, I do have another one...

with setfacl, If if have a user Joe. Joe creates a directory, I would like that directory to be drwxrwx--x. And now joe creates a file in that directory and the permissions are -rw-rw-r--. I cant find a way to do this with masks in acl's or anything.

Thanks for the reply though!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recursive ACL's with `setfacl` ? aurelio26 *BSD 1 08-26-2008 08:57 AM
setfacl operation not permitted oscarmv Linux - Security 1 05-07-2007 06:19 AM
setfacl linuxjamil Linux - Security 1 04-05-2007 02:00 PM
Setfacl subaruwrx Fedora 3 09-07-2004 09:18 AM
acl/setfacl help ebs Linux - General 1 06-20-2003 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration