LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 05-26-2010, 02:49 PM   #1
SamuraiCoder
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
can i give directory permission to a group and not specific user?


I'm trying to do something like this
i created a group called www and made this group the owner of the directory
/var/www/html
so i can read and write to it.
of course I've add my self to this group, but it seems i can't read and write.
the syntax i used was something like chown :www /var/www/html.
didn't work
only when i used chown samurai:www /var/www/html i could finally could create new file.
the reason i don't want to specify the user name is because I'm thinking of a scenario when i need to give permission to a large group of ppl and don't want to do it user by user.
so, what did i do wrong?
 
Old 05-26-2010, 03:11 PM   #2
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 41
You always need to specify a user as well as a group. Just specify a group in your case, and you can set the permission of the user & group with the command: "example: chmod 777" to give the user rwx , the group rwx and everyone else rwx. (read write execute).

As user you could use user: "nobody" for example, this specifies no user.

4 = read
2 = write
1 = execute
0 = no rights

hope this helps!

good luck.
 
Old 05-26-2010, 03:23 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
What's the output of:

Code:
ls -l /var/www/html
?

Make sure that the group permissions are right.
 
Old 05-26-2010, 04:19 PM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 590

Rep: Reputation: 64
Quote:
Originally Posted by SamuraiCoder View Post
I'm trying to do something like this
i created a group called www and made this group the owner of the directory
/var/www/html
so i can read and write to it.
of course I've add my self to this group, but it seems i can't read and write.
the syntax i used was something like chown :www /var/www/html.
didn't work
only when i used chown samurai:www /var/www/html i could finally could create new file.
the reason i don't want to specify the user name is because I'm thinking of a scenario when i need to give permission to a large group of ppl and don't want to do it user by user.
so, what did i do wrong?


You need to post the output of ls -l, you can try changing the secondary group of the directory or you can use chgrp to change the group according to your wish, see if it works.

Last edited by Sayan Acharjee; 05-26-2010 at 04:23 PM.
 
Old 05-26-2010, 04:21 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I'm pretty sure you meant "ls -l", because what's the point of ls -i? How would knowing the inode numbers help?
 
Old 05-26-2010, 04:23 PM   #6
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 590

Rep: Reputation: 64
Yes, I meant ls -l there.......thanks for pointing that, I've edited it.
 
  


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
What Does Each Group Give Permission To? Do7AN Slackware 6 02-14-2007 02:48 AM
Give the root Permission to other user for manage File/Directory shipon_97 Linux - Newbie 2 01-28-2007 11:46 AM
how to give 'guest' rwx permission on a file/directory RH9Linux Linux - Software 3 06-27-2005 08:59 PM
Howto give permission to hole directory js72 Debian 3 12-08-2004 04:50 PM
give users permission to install software in their directory? ksgill Linux - Newbie 7 12-17-2003 11:16 AM


All times are GMT -5. The time now is 02:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration