LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial 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 08-24-2003, 11:58 PM   #1
Sabeer
Member
 
Registered: Mar 2003
Posts: 38

Rep: Reputation: 15
Giving a user rights Help!!!


Hi

I am a newbie
I need a clear picture of user rights

Suppose I create a file example.txt

I need to give permisssions for this file

for example

chmod g+rx example.txt
Let the group read and execute permissions to eaxmple.txt.

So if i give this group will be given read and execute

But which group?
Suppose there are 5 groups which I created
So will all the 5 groups will be give the above perimission

I need to give for only a particular group called sales

how would i mention that Sales group in the command

See can any one make me clear

I created a file example.txt

This file should should have all kind of permission for a user james and group sales

so for this I give chmod 770 file name

which means users and group is given full access

but users mean all the users in the system?
Groups means all the groups in the system?

I cannot understand this

I need to give only for james and the sales group

so in the command i do not find james and sales

ie is thers any command like chmod 770 james sales file name?

Please make me underatand in better way please


Regards
Sabeer
 
Old 08-25-2003, 12:02 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Just of the group that owns the file. To view which group/user owns the file:
ls -l filename.txt

This should return something like this:
Code:
-rw-r--r--    1 masterc  users        178k May 30 05:22 logo.png
Which shows group 'users' owns that file, and has read priv's.

You can own the file to a different group in a number of ways:
chgrp
chown user.group (where user is the user to own it to, and group is the group to own it to) so for sales to own it:
chown root.sales filename.txt
Would change it so root owned it, and the group sales had access to it as well, with the permissions you give to the group owner.

HTH

Cool
 
  


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
Giving individual users editing rights for websites using Apache Server aakash Linux - General 1 05-26-2005 01:41 PM
Giving Kppp rights to other users n groups xxx_anuj_xxx Linux - Security 5 12-22-2004 06:12 PM
Giving users more rights (Admin) FatSteve Linux - Security 7 11-19-2003 06:37 AM
Squid proxy with user authentication and user rights duvanhorn Linux - Networking 0 08-07-2003 03:40 AM
Giving a user CHMOD rights to the /var/www/html directory? scubes13 Linux - Networking 3 08-18-2002 03:38 PM


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