LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-11-2014, 10:34 AM   #1
tux100
LQ Newbie
 
Registered: Aug 2014
Posts: 22

Rep: Reputation: Disabled
Group Permissions


I created user "bob"
I added bob to group "www-data"

I updated the website permissions

chown -R www.data.www.data /var/www/
chmod -R 775 /var/www/

I thought bob would be able to write files in /var/www but he cannot. What am I missing ?

TIA
 
Old 09-11-2014, 10:37 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
What does
Code:
ls -al /var/www/
show?
 
Old 09-11-2014, 10:52 AM   #3
tux100
LQ Newbie
 
Registered: Aug 2014
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
What does
Code:
ls -al /var/www/
show?
permissions were changed to this.
user bob belongs to group www-data

-rwxr-xr-x 1 www-data www-data 19332 Aug 27 17:44 COPYING
-rwxr-xr-x 1 www-data www-data 3997 Aug 27 17:44 CREDITS
-rwxr-xr-x 1 www-data www-data 77 Aug 27 17:44 FAQ
-rwxr-xr-x 1 www-data www-data 635332 Aug 27 17:44 HISTORY
 
Old 09-11-2014, 10:56 AM   #4
osucowboy0510
LQ Newbie
 
Registered: Aug 2014
Distribution: CentOS 7
Posts: 11

Rep: Reputation: Disabled
the command should be chgrp and not chown

chgrp -R <groupname> <dirname>
 
Old 09-11-2014, 12:34 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
The permissions you show for /var/www show rwx for the user www-data and only read/execute for the group which user bob belongs to. If you give write permissions to the group www-data, that would work but then any user in the www-data would have write permissions. You can create a sub-directory in /var/www and give user bob ownership. Not sure what you are using this for or what you want to do.
 
  


Reply



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 changes group permissions; giving another user rw permissions secretlydead Linux - Server 4 09-22-2012 11:12 PM
Group permissions: user can't access 770 directory even though a member of group jm34003 Linux - Security 13 05-16-2012 02:03 PM
Member of group root, but root group permissions don't apply? aeternitas Linux - Software 7 04-21-2010 11:06 PM
Secondary group users need to change the file permissions of primary group files? sunnybmv Linux - Newbie 3 12-10-2009 04:57 PM
permissions not recognizing group or assigned users to group blckspder Linux - Server 1 07-28-2008 10:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:45 PM.

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