LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2008, 05:12 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
ACL problems


Hi.


I've set default ACLs on one of my folders, say, "test". The default ACL says that user "testuser" have rwx permissions on test (and therefore its subfolders).

Although "testuser" has rwx permissions on folder "test", it is now allowd to delete files and folders found here. BUT, "testuser" is allowd to delete files and folders found under subdirectories of "test", for example "test/folder1".

So in other words, "testuser" is allowed to delete files under subdirecories of "test", but not directly under test itself. To me this seems very odd.

Can anyone explain why this is happening? How can I make sure that "testuser" has full permissions starting from folder "test"?


Regards,
kenneho
 
Old 06-16-2008, 05:19 AM   #2
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
To make things more clear, this is my sample file structure:

test/
test/file1.txt
test/folder1/
test/folder1/file2.txt
test/folder1/folder2/
test/folder1/folder2/file2.txt

Before creating the files and folders under "test" I set the default ACL for "test" to "user:testuser:rwx".
To my best knowledge, this should enable "testuser" to delete files and folders under "test". But "testuser" is only allowed to delete files and folders starting at level 2 i.e. from "folder1".
 
Old 06-16-2008, 05:20 AM   #3
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL 4
Posts: 363

Rep: Reputation: 29
is that ACL problem or directory permission can't make sense of your question. and where did you define the ACL for testuser.

thanks

Last edited by shahz; 06-16-2008 at 05:22 AM.
 
Old 06-16-2008, 05:31 AM   #4
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by shahz View Post
is that ACL problem or directory permission can't make sense of your question. and where did you define the ACL for testuser.

thanks
Sorry, didn't quite understand your question. :/ Can you please rephrase that?

Anyway, this is how I set the ACL for "testuser":

Code:
setfacl -m d:u:testuser:rwx /var/tmp/test/
The /var/tmp/test folder is owned by root, and has "other" permission rx.
 
Old 06-16-2008, 07:05 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You will need to show the permissions and acl's for each subdirectory and file.
To delete a file, a user needs write permissions on the containing directory. Creating or deleting a file writes to the directory. If the sticky bit is set, then only the owner can delete a file. This allows multiple users to create files in /tmp but only the owner can create the file.

Don't assume that files and directories inherent the acl's of the parent directory.
 
Old 06-16-2008, 07:32 AM   #6
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
Solved

I think I got things working now. Turn out that in addition to setting the default ACLs for the folder "test", I had to set similar ACL attributes to the folder itself. Thought this was implied when setting the default ACL on the folder, but I guess it wasn't.
 
  


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
iptables acl versus cisco acl id_viorel Linux - Security 1 04-09-2008 06:00 AM
.htaccess + ACL willigiann Linux - Networking 3 12-12-2006 09:40 AM
acl sheetu Solaris / OpenSolaris 1 09-10-2006 01:48 PM
ACL Problems Daniboy Linux - Software 6 10-10-2005 10:22 AM
ACL Help theDrix Linux - General 0 07-22-2004 09:25 AM


All times are GMT -5. The time now is 03:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration