LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-19-2016, 01:29 AM   #1
RAFAL
Member
 
Registered: Feb 2006
Location: Warsaw, Poland
Distribution: Archlinux, Debian
Posts: 139

Rep: Reputation: 16
Permission denied despite of correct authorizations


Hello,

I am familiar with the classic permission design as described here:
http://www.comptechdoc.org/os/linux/..._ugfilesp.html

I have directory blogwp4 which I need to access as user 'rafal'
Command 'ls -la' gives me this:
drw-rw-rw- 5 rafal rafal 4096 Jan 19 08:05 blogwp4
this means that User Permissions + Group Permissions + Other Permissions
are set to "rw" , right?
So basically everybody should have access to the files.

When I try to change to this directory I get error:

[rafal@localhost http]$ cd blogwp4
bash: cd: blogwp4: Permission denied

I thought it might be related to ACL as decribed here;
https://wiki.archlinux.org/index.php..._Control_Lists
so I executed this
[rafal@localhost http]$ getfacl blogwp4
# file: blogwp4
# owner: rafal
# group: rafal
user::rw-
group::rw-
other::rw-

everything looks fine, so why I cannot open this directory?

Directory is inside encrypted LUKS partition with EXT4 filesystem.

Any ideas what can be wrong ?

Best regards
Rafal

Last edited by RAFAL; 01-19-2016 at 02:00 AM.
 
Old 01-19-2016, 02:06 AM   #2
RAFAL
Member
 
Registered: Feb 2006
Location: Warsaw, Poland
Distribution: Archlinux, Debian
Posts: 139

Original Poster
Rep: Reputation: 16
Running chmod with R option solved issue.
Content of the directory also needs proper rights for listing.
The thing is that files inside were given to rafal:users.
My user 'rafal' is part of that group.

In which cases should/can I use ACL?
What will be advantage of it?
 
Old 01-19-2016, 02:51 AM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,258
Blog Entries: 24

Rep: Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193
Quote:
Originally Posted by RAFAL View Post
I have directory blogwp4 which I need to access as user 'rafal'
Command 'ls -la' gives me this:
drw-rw-rw- 5 rafal rafal 4096 Jan 19 08:05 blogwp4
this means that User Permissions + Group Permissions + Other Permissions
are set to "rw" , right?
So basically everybody should have access to the files.

When I try to change to this directory I get error:

[rafal@localhost http]$ cd blogwp4
bash: cd: blogwp4: Permission denied
The directory itself should have 'x' bit set as well.

In directory context 'x' means traverse instead of execute, and allows owner/group/other to access meta data inside the directory, or effectively to traverse the directory (i.e. to cd into it for example).

The page that you linked for permissions appears to be incomplete in not mentioning this. You will find mention of it here for example.

From that page:

Quote:
The execute permission grants the ability to execute a file. This permission must be set for executable programs, including shell scripts, in order to allow the operating system to run them. When set for a directory, this permission grants the ability to access file contents and meta-information if its name is known, but not list files inside the directory, unless read is set also.

Last edited by astrogeek; 01-19-2016 at 03:00 AM.
 
1 members found this post helpful.
Old 01-20-2016, 12:08 AM   #4
RAFAL
Member
 
Registered: Feb 2006
Location: Warsaw, Poland
Distribution: Archlinux, Debian
Posts: 139

Original Poster
Rep: Reputation: 16
thank you. Now it works fine.
 
Old 01-20-2016, 09:01 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
pls make sovled - I just read this wanting to help and you fixed it already,
Quote:
But why do only unimportant things?" asked Milo, who suddenly remembered how much time he spent each day doing them....
 
  


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] Execute permission set but permission denied when unlocking IronKey mdh524 Linux - Newbie 2 11-12-2015 09:36 PM
mkdir throws Permission Denied error in a directoy even with root ownership and 777 permission surajchalukya Linux - Security 14 09-03-2012 08:34 AM
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 05:57 AM
authorizations and/or ownership mess marlaina1 Linux - General 3 06-14-2001 11:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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