LinuxQuestions.org
Review your favorite Linux distribution.
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 12-09-2014, 08:09 PM   #1
wh33t
Member
 
Registered: Oct 2003
Location: Canada
Posts: 671

Rep: Reputation: 46
Help with permissions


Hey LQ,

I've given ownership of /var/www/html to www-data and my username wh33t is added to that group.

Code:
wh33t@Wh33tBox:/var/www$ groups wh33t
wh33t : wh33t adm cdrom sudo dip www-data plugdev lpadmin sambashare
And I can verify www-data owns html/

Code:
wh33t@Wh33tBox:/var/www$ ls -l
total 4
drwxrw-rw- 9 www-data www-data 4096 Dec  7 22:48 html
And now when I try to cd into it I get permission denied. WTF!?

Code:
wh33t@Wh33tBox:/var/www$ cd html/
-bash: cd: html/: Permission denied
Any ideas what's going on?

Ubuntu Server 14LTS
 
Old 12-09-2014, 08:12 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

to cd to a directory it needs to be executable. You care missing the group executable bit on that directory. The following should remedy that.
Code:
chmod g+x /var/www/html
HTH,

Evo2.
 
Old 12-09-2014, 09:08 PM   #3
wh33t
Member
 
Registered: Oct 2003
Location: Canada
Posts: 671

Original Poster
Rep: Reputation: 46
I never knew that "cd" was execution.

I thought it meant in order to execute a program from within that directory.

Very glad to know. Thank you!
 
Old 12-09-2014, 09:24 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,968

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
You need execute permission to do anything more than list the names (and only the names - no status) from a directory. Using the directory to access any of the member files' inodes is "execution", as is making that directory your CWD.
 
  


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] Samba and permissions ( permissions seems ok but wont work anyway ) spooksman Linux - Networking 1 04-10-2014 10:58 AM
setfacl changes group permissions; giving another user rw permissions secretlydead Linux - Server 4 09-23-2012 12:12 AM
relation between programs permissions and permissions of the files they use rblampain Linux - Security 1 07-10-2011 09:40 PM
[SOLVED] filesystem permissions question - making so user can't change permissions? c0pe Linux - Security 4 07-12-2010 10:06 AM
[SOLVED] Lack basic understanding of permissions(apache permissions problem) cK` Linux - Newbie 7 04-09-2010 12:49 AM


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