LinuxQuestions.org
Visit Jeremy's Blog.
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 04-15-2014, 07:36 PM   #1
b_mikhael
LQ Newbie
 
Registered: Apr 2014
Distribution: CentOS, Ubuntu
Posts: 8

Rep: Reputation: Disabled
ACL problem in CentOS


Hi,

I'm trying to set ACL rules on a file, but i can never make it to work.

Here is the steps i follow:
1- mount -o remount,acl /
2- login as user "user1".
3- touch /home/user1/test.txt
4- chmod 700 /home/user1/test.txt
5- setfacl -m u:user2:rw /home/user1/test.txt
6- su user2
7- cat /home/user1/test.txt
cat: /home/user1/test.txt: Permission denied

Any suggestion, what's wrong with what i do???
 
Old 04-15-2014, 07:43 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
what homework assignment are you trying to do
two things
it might have something to do with -- "chmod 700"
and then loging in as a DIFFERENT user
 
Old 04-15-2014, 08:08 PM   #3
b_mikhael
LQ Newbie
 
Registered: Apr 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
ACL problem in CentOS

I've tried to create another file with the previous steps but without the "chmod" command, but still the same problem persist.
 
Old 04-15-2014, 08:33 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,959

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
User2 also needs, at a minimum, "execute" permission in directory /home/user1.
 
Old 04-15-2014, 09:20 PM   #5
b_mikhael
LQ Newbie
 
Registered: Apr 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
ACL problem in CentOS

it works
after i added execute permission to the directory containing the file, it worked.
i used the following command:

# setfacl -m u:user2:rx /home/user1
 
Old 04-15-2014, 10:18 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
it would not be wise to let user2 have full read access to user1's home folder

you only want user2 to be able to read that one text file
 
Old 04-16-2014, 01:03 AM   #7
b_mikhael
LQ Newbie
 
Registered: Apr 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
ACL problem in CentOS

so what do you suggest???
 
Old 04-16-2014, 02:25 AM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
what dose the textbook you are using say ?
 
Old 04-16-2014, 01:07 PM   #9
b_mikhael
LQ Newbie
 
Registered: Apr 2014
Distribution: CentOS, Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
ACL problem in CentOS

the book says to give ACL permissions to the file and it never mentioned the directory. but when i do as it is written, it does NOT work!!!
 
  


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
Configuring ACL on CentOS - mount/fstab Fed Red Hat 5 08-07-2012 06:31 AM
problem with samba and ACL ,ACL does not work as I want golden_boy615 Linux - Server 1 12-18-2011 10:18 AM
Why does the ACL of a file created under a directory differ from the default ACL sctebnt Linux - Security 5 12-02-2011 09:13 AM
iptables acl versus cisco acl id_viorel Linux - Security 1 04-09-2008 06:00 AM
Problem with ACL kousik Linux - Security 1 08-31-2005 11:12 AM


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