LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-31-2007, 01:46 PM   #1
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 637

Rep: Reputation: 32
Question Question about chmod and group priv's


If you are using chmod with the root user and you do a chmod g=wrx which grouo is it giving those permissions to?

Obviously there are more than just one group and I was wondering how to assign specific permissions per group. (like burning or audio... etc)
 
Old 01-31-2007, 02:39 PM   #2
MOS JEFF-INITELY
Member
 
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
It depends on which group owns the file.

for example:

if group microsoft owns the file GETVISTA you would be changing permissions for that group on the file :

>ls -al | grep GETVISTA
-rw-r--r-- 1 billygates microsoft 0 2007-01-31 15:33 GETVISTA

>whoami
root

>chmod g=wrx GETVISTA
-rw-rwxr-- 1 billygates microsoft 0 2007-01-31 15:34 GETVISTA

however if another group owns the file.. that group would have access.

hope this helps.

ease-e
 
Old 01-31-2007, 02:55 PM   #3
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy jessie stretch buster
Posts: 1,646

Rep: Reputation: 98
Hi,

I am having a little bit difficulty understanding second part of original question.

If g=rwx, this means that the group of the file, (seen by ls -l) has that permission.
And /etc/group defines which user belongs to what group.

I do not think any group owns file, as suggested by #2 line 1.

Happy Penguins!
 
Old 01-31-2007, 03:18 PM   #4
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 637

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by kaz2100
Hi,

I am having a little bit difficulty understanding second part of original question.

If g=rwx, this means that the group of the file, (seen by ls -l) has that permission.
And /etc/group defines which user belongs to what group.

I do not think any group owns file, as suggested by #2 line 1.

Happy Penguins!
Let me put it like this then... How do I assign a file to a specific group? (Giving only that group access to the file rwx)
 
Old 01-31-2007, 03:21 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
You can use:
Code:
chown :group_here file_here
If you need to restrict permissions from others, use
Code:
chmod o-rwx file_here
 
Old 01-31-2007, 03:24 PM   #6
MOS JEFF-INITELY
Member
 
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
chgrp <newgroup> GETVISTA

and I think you took my words a little too literally the original creater owns the file (unless changed) .. the users in the group can have access to the file.

Billy G for President.

Last edited by MOS JEFF-INITELY; 01-31-2007 at 03:33 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chmod question curtisf14 Linux - Newbie 4 07-23-2006 03:05 AM
How can I give myself root priv's as a user? Mr. Hill Linux - Newbie 9 06-12-2005 02:19 PM
Trouble understanding chmod & group permissions gen-ik Linux - Newbie 3 07-19-2004 01:51 PM
chmod for a group on a certain directory? mfeoli Linux - Newbie 1 02-10-2004 05:13 PM
User priv's on mounted hard drives harperonline Linux - Networking 3 03-11-2003 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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