LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 09-15-2016, 01:56 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 393

Rep: Reputation: Disabled
unable to access directory after enabling access via setfacl


Here is the directory.
Code:
[a1@localhost test]$ ls -dl /test
drwxrwx---+ 2 a1 gp1 43 Sep 14 16:36 /test

Here is its currect ACL:
# Note user c1 is enable for read.
[a1@localhost test]$ getfacl /test
getfacl: Removing leading '/' from absolute path names
# file: test
# owner: a1
# group: gp1
user::rwx
user:c1:r--
group::rwx
mask::rwx
other::---
Here is c1's IDs.
Code:
[a1@localhost test]$ id c1
uid=1003(c1) gid=1003(c1) groups=1003(c1)
Now I try to use c1 to go into as well as read /test:
Code:
[c1@localhost /]$ cd /test
-bash: cd: /test: Permission denied

#Read /test
[c1@localhost /]$ ls -al /test
ls: cannot access /test/.: Permission denied
ls: cannot access /test/..: Permission denied
ls: cannot access /test/a1_file.txt: Permission denied
ls: cannot access /test/a1: Permission denied
ls: cannot access /test/a12: Permission denied
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
?????????? ? ? ? ?            ? a1
?????????? ? ? ? ?            ? a12
?????????? ? ? ? ?            ? a1_file.txt
Why is ACL not working for c1 on /test when it is already enabled for c1 to read?
Thank you.

Last edited by fanoflq; 09-15-2016 at 02:02 PM.
 
Old 09-15-2016, 02:16 PM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,959

Rep: Reputation: Disabled
/test is a directory or file in root of the filesystem.
test is a file or directory in your current directory, e.g. /home/user/test.
 
Old 09-15-2016, 02:27 PM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 393

Original Poster
Rep: Reputation: Disabled
@Emerson:

Quote:
[c1@localhost /]$ ls -al | grep test
drwxrwx---+ 2 a1 gp1 43 Sep 14 16:36 test
drwxr--rwt. 2 root root 48 Sep 15 12:19 test1

[c1@localhost /]$ cd test
-bash: cd: test: Permission denied

[c1@localhost /]$ cd /test
-bash: cd: /test: Permission denied

[c1@localhost /]$ file test
test: directory
Quote:
[a1@localhost /]$ ls -al | grep test
drwxrwx---+ 2 a1 gp1 43 Sep 14 16:36 test
drwxr--rwt. 2 root root 48 Sep 15 12:19 test1

[a1@localhost /]$ getfacl test
# file: test
# owner: a1
# group: gp1
user::rwx
user:c1:r--
group::rwx
mask::rwx
other::---

[a1@localhost /]$ getfacl /test
getfacl: Removing leading '/' from absolute path names
# file: test
# owner: a1
# group: gp1
user::rwx
user:c1:r--
group::rwx
mask::rwx
other::---

[a1@localhost /]$ file test
test: directory
test is same for both login accounts and is a directory.
Did I missed what you wrote?

Last edited by fanoflq; 09-15-2016 at 02:42 PM.
 
Old 09-15-2016, 03:00 PM   #4
fanoflq
Member
 
Registered: Nov 2015
Posts: 393

Original Poster
Rep: Reputation: Disabled
I changed /test permissions to enable read for others.
Still same denied permission for c1.

Quote:
[c1@localhost /]$ cd test
-bash: cd: test: Permission denied
[c1@localhost /]$ ls -al | grep test
drwxrwxr--+ 2 a1 gp1 43 Sep 14 16:36 test
drwxr--rwt. 2 root root 48 Sep 15 12:19 test1

[c1@localhost /]$ getfacl test
# file: test
# owner: a1
# group: gp1
user::rwx
user:c1:r--
group::rwx
mask::rwx
other::r--

[c1@localhost /]$ id c1
uid=1003(c1) gid=1003(c1) groups=1003(c1)
c1 does not belong to gp1.
But it should not matter since ....

1) ACL should enable read access for a
single user not belonging to group gp1.

2) /test has read permission enabled for others

Correct?
Where is the cause of denied access?

Last edited by fanoflq; 09-15-2016 at 03:07 PM.
 
  


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
setfacl to provide user access to /var/log does not work Curiosity42 Red Hat 19 02-16-2013 05:53 AM
unable to access directory in apace - help jman623 Linux - Server 1 08-01-2007 09:23 AM
unable to access ICEauthority/no directory, logging in with HOME=/ ravisghosh Linux - General 4 11-27-2006 06:54 AM
Unable to access home directory zillah Solaris / OpenSolaris 50 07-07-2005 07:39 AM
apache unable to access /home/*/public_html directory cavemanf16 Linux - Software 6 07-08-2004 05:43 AM


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