LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-08-2015, 09:15 AM   #1
AndreyChe
LQ Newbie
 
Registered: Apr 2015
Location: Voronezh
Distribution: Debian, CentOS
Posts: 2

Rep: Reputation: Disabled
Posix ACL


I've got file server Red Hat Enterprise Linux Server release 6.5 (Samba).
I use Access Control Lists for granting access for varios catalogs inside samba share.

Here config of samba share:
Code:
[Episodes]
    path = /srv/resources/shares/Episodes
    writeable = yes
    browsable = yes
    valid users = @sw_god, @SW_all
    read list =.
    write list = @sw_god, @SW_all
    create mask = 0770
    force directory mode = 0770
    force group = root
Inside /srv/resources/shares/Episodes access is restricted by ACLs.
For example directory /srv/resources/shares/Episodes/Ep01/Cameras/Final has these permisions:

Code:
# file: srv/resources/shares/Episodes/Ep01/Cameras/Final
# owner: root
# group: root
user::rwx
group::r-x
group:sw_god:rwx
group:sw_all:r-x
group:sw_operator:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:sw_god:rwx
default:group:sw_all:r-x
default:group:sw_operator:rwx
default:mask::rwx
default:other::---
These permisions were set by these commands:

Code:
setfacl -b -R srv/resources/shares/Episodes/Ep01
chmod -R 750 srv/resources/shares/Episodes/Ep01
chown -R 0:0 srv/resources/shares/Episodes/Ep01

setfacl -R -m g:sw_all:rx srv/resources/shares/Episodes/Ep01
setfacl -R -d -m g:sw_all:rx srv/resources/shares/Episodes/Ep01

setfacl -R -m g:sw_god:rwx srv/resources/shares/Episodes/Ep01
setfacl -R -d -m g:sw_god:rwx srv/resources/shares/Episodes/Ep01

setfacl -R -m g:sw_operator:rwx srv/resources/shares/Episodes/Ep01/Cameras/Final
setfacl -R -d -m g:sw_operator:rwx srv/resources/shares/Episodes/Ep01/Cameras/Final
In other words group sw_all has access to read, group sw_god has aceess to read/write in whole directory Ep01
Also group sw_operator has rights to read/write in Ep01/Cameras/Final

I've got two users testuser and testuser2:

Code:
# id testuser
uid=3365(testuser) gid=3000(domain users) groups=3000(domain users),3010(sw_all),3034(sw_operator),3018,3012(BUILTIN\users)

# id testuser2
uid=3366(testuser2) gid=3000(domain users) groups=3000(domain users),3010(sw_all),3012(BUILTIN\users)
As we can see testuser consists in sw_all and sw_operator groups, testuser2 consists in group sw_all.
So in theory testuser has permisions to write in directory Episodes/Ep01/Cameras/Final and testuser2 has only permision to read.
In practice so it is. But the problem is testuser creates something in Episodes/Ep01/Cameras/Final, for example Episodes/Ep01/Cameras/Final/test
After than testuser2 can write anything in directory Episodes/Ep01/Cameras/Final/test, but can't in Episodes/Ep01/Cameras/Final

Why testuser2 has permisions to write in directory Episodes/Ep01/Cameras/Final/test ?

Permission:

Code:
[root@]# getfacl /srv/resources/shares/Episodes/Ep01/Cameras/Final
# file: srv/resources/shares/Episodes/Ep01/Cameras/Final
# owner: root
# group: root
user::rwx
group::r-x
group:sw_god:rwx
group:sw_all:r-x
group:sw_operator:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:sw_god:rwx
default:group:sw_all:r-x
default:group:sw_operator:rwx
default:mask::rwx
default:other::---

[root@]# getfacl /srv/resources/shares/Episodes/Ep01/Cameras/Final/test/
# file: srv/resources/shares/Episodes/Ep01/Cameras/Final/test/
# owner: testuser
# group: root
user::rwx
group::rwx
group:sw_god:rwx
group:sw_all:r-x
group:sw_operator:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::r-x
default:group:sw_god:rwx
default:group:sw_all:r-x
default:group:sw_operator:rwx
default:mask::rwx
default:other::---
 
  


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
Compressed fs with acl (posix) support? jsveiga Linux - Server 3 04-17-2012 04:05 PM
What is the check order for Posix ACL? HGeneAnthony Linux - Newbie 0 04-15-2006 01:16 AM
POSIX and ACL on folders BruceC Linux - Newbie 1 10-06-2005 02:23 PM
POSIX and ACL on folders BruceC Other *NIX 0 10-05-2005 01:57 PM
posix acl Ammad Linux - General 3 03-20-2005 05:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:18 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