LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-14-2008, 07:17 AM   #1
sunilvadranapu
Member
 
Registered: May 2006
Posts: 64

Rep: Reputation: 15
how to remove the set-group-ID


hi,

i have a file with following permissons:
drwx--S--- 2 ab230081 4096 Aug 14 17:18 public/

i want to set its permssions as
drwxr-xr-x 2 ab230081 4096 Aug 14 17:18 public/

withouts 's' flag

can any one tell me how to remove the set-group-ID from file/dir permissons?

thanks in advance


-sunil
 
Old 08-14-2008, 07:53 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Code:
chmod 755 public
would be the most straigh forward way. There are other ways.

For more explanation type

info chmod

and follow the note on "file permissions." (If you are using a distro that provides info files.)
 
Old 02-07-2010, 05:36 PM   #3
dalvarez
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 1
Removing the set-group-id flag

chmod 775 <filename> will most likely not remove the set group id flag.
Unless explicitly asked to do so, chmod will not touch it. I tried it on Debian 5 and it does not work.

Use chmod g-s <filename> instead to remove it.

Last edited by dalvarez; 02-07-2010 at 05:39 PM.
 
1 members found this post helpful.
Old 02-10-2010, 06:20 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by dalvarez View Post
chmod 775 <filename> will most likely not remove the set group id flag.
Unless explicitly asked to do so, chmod will not touch it. I tried it on Debian 5 and it does not work.
That's strange. It works on Debian Etch (4.0):

Code:
jim@debian:~$ mkdir /tmp/a
jim@debian:~$ chmod 2700 /tmp/a
jim@debian:~$ ls -ld /tmp/a
drwx--S--- 2 jim jim 4096 2010-02-10 05:04 /tmp/a
jim@debian:~$ chmod 755 /tmp/a
jim@debian:~$ ls -ld /tmp/a
drwxr-xr-x 2 jim jim 4096 2010-02-10 05:04 /tmp/a
jim@debian:~$
 
Old 02-11-2010, 02:45 AM   #5
debrah.h48
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
Hello,

Here you can get the steps to remove the set-group-ID
http://audible.custhelp.com/app/answ...tail/a_id/3867
 
Old 02-11-2010, 07:10 PM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by debrah.h48 View Post
Here you can get the steps to remove the set-group-ID
http://audible.custhelp.com/app/answ...tail/a_id/3867
Errr ... That link has something to do with Microsoft Windows, not the LInux question the OP posed!

In any event, dalvarez has already posted one generic method to clear the set GID bit. And I have posted a less generic method that works for the situation posed by the OP, While dalvarez has suggested my method does not work on Debian 5, on the systems I have tried it on (not including Debian 5) it works fine.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
remove group RPMs from a DVD ncsuapex Linux - Software 1 07-14-2008 01:24 PM
How to remove user from their secondary group? Akhran Linux - Newbie 2 09-13-2006 04:09 AM
Set group id,set user id? JAKK Slackware 3 06-15-2006 10:16 PM
How to view set-user-ID and set-group-ID Xris718 Linux - General 7 01-10-2004 01:44 PM
[alert] (22) Invalid argument : setgid : unable to set group id to Group 4294967295 Niraj Linux - Networking 1 12-13-2001 06:58 AM

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

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