Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-09-2014, 08:09 PM   #1
Registered: Oct 2003
Location: Canada
Posts: 699

Rep: Reputation: 47
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.

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/

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!?

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
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

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.
chmod g+x /var/www/html

Old 12-09-2014, 09:08 PM   #3
Registered: Oct 2003
Location: Canada
Posts: 699

Original Poster
Rep: Reputation: 47
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
Senior Member
Registered: Aug 2009
Distribution: CentOS
Posts: 3,618

Rep: Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577
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.


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration