LinuxQuestions.org
Review your favorite Linux distribution.
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 04-17-2015, 06:59 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Rep: Reputation: 31
Setting ACL isn't working


ACL's seem strait forward but I can't seem to get mine to work. Am I doing something incorrectly?

Setting the ACL for testuser on /test_dir
Code:
setfacl -Rdm u:testuser:rwx /test_dir/

[root@workstation1 ~]# getfacl /test_dir
getfacl: Removing leading '/' from absolute path names
# file: test_dir
# owner: root
# group: root
user::rwx
group::rwx
other::---
default:user::rwx
default:user:testuser:rwx
default:group::rwx
default:mask::rwx
default:other::---

Logging in and testing access

Code:
[root@workstation1 ~]# su - testuser
[testuser@workstation1 ~]$ cd /test_dir/
-bash: cd: /test_dir/: Permission denied
Checking if ACL is enabled on system

Code:
[root@workstation1 ~]# tune2fs -l /dev/mapper/vg_root-lv_root | grep acl
Default mount options:    user_xattr acl
Does anyone see something I'm missing?

Last edited by mijohnst; 04-17-2015 at 07:00 PM.
 
Old 04-18-2015, 01:59 AM   #2
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Ok, I think I've solved this. The problem was that I was using the -d (--default) options, which is like a umask. Leaving out the -d made it act as I expected.

Code:
[root@echo /]# setfacl -Rm u:testuser:r-x /TEST/
[root@echo /]# getfacl /TEST/
getfacl: Removing leading '/' from absolute path names
# file: TEST/
# owner: testuser2
# group: testuser2
user::rwx
user:testuser:r-x
group::rwx
mask::rwx
other::---

[root@echo TEST]# su - testuser
[testuser@echo ~]$ cd /TEST/
[testuser@echo TEST]$ ls -al
total 20
drwxrwx---+  2 testuser2 testuser2 4096 Apr 18 02:06 .
dr-xr-xr-x. 26 root      root      4096 Apr 18 01:17 ..
-rw-rwx---+  1 testuser2 testuser2    0 Apr 18 01:57 junk
-rw-rwx---+  1 testuser  testuser     0 Apr 18 02:01 junk2
[testuser@echo TEST]$ touch junk3
touch: cannot touch `junk3': Permission denied
[testuser@echo TEST]$

Last edited by mijohnst; 04-18-2015 at 02:08 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] question about setting ACL karthik-naren Linux - Newbie 3 07-02-2013 11:58 AM
setting ACL recursively amar.sree Linux - Newbie 4 11-06-2012 06:05 AM
question setting acl's. extendedping Linux - Software 1 01-25-2008 04:59 AM
setting acl in aix manoj.linux AIX 0 10-08-2007 10:31 PM
Need help setting up an ACL flibby Linux - Security 3 01-17-2006 10:21 PM

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

All times are GMT -5. The time now is 09:50 AM.

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