- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: setgid command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2006 06:21 PM
07-25-2006 06:21 PM
Where do we use setgid for setting the permission ?
Are there any programs and files we use this permission ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2006 06:41 PM
07-25-2006 06:41 PM
SolutionLike passwd command. It has setuid set. Now owner of passwd file is root, but we all can execute it. It has setuid set, so anybody executing it will in turn cause it to run as root user(which is allowed to update passwd file)
In same way setgid would allow a group os users to execute a file as if they all are owner of that file.
find . -perm -02000 -exec ll -d {} \;
will find files with setgid set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2006 11:34 PM
07-25-2006 11:34 PM
Re: setgid command
Using the 'setgid' bit for *directories* has a useful side effect for files and directories created *within* the directory.
The effect is that new files are created with their group ID set to that of the directory. This applies for new directories, too. The new sub directories will also have their setgid bit set on (at least on some Unixes).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2006 11:48 PM
07-25-2006 11:48 PM
Re: setgid command
Also is you are planning to use setgid in binary files this small guide will help you out,
http://neworder.box.sk/newsread.php?newsid=2380
Regards,
Jaime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 02:30 AM
07-26-2006 02:30 AM
Re: setgid command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 02:49 AM
07-26-2006 02:49 AM
Re: setgid command
Here are some of the files on one of my 11.00 systems that are setguid:
/usr/bin/mail
/usr/bin/X11/hpterm
/usr/bin/X11/xfs
/usr/bin/elm
/usr/bin/iostat
/usr/bin/ipcs
/usr/bin/kermit
/usr/bin/rmail
/usr/bin/netstat
/usr/bin/uptime
/usr/bin/stmkfont
/usr/bin/top
/usr/bin/w
/usr/bin/vmstat
/usr/bin/pipcs
If you're interested exclusively in files that are setguid, you can find them with:
find / \( -perm -g+s -a ! -perm -u+s \) -print
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 03:38 AM
07-26-2006 03:38 AM
Re: setgid command
Setuid and setgid are needed for tasks that require higher privileges than those which a common user has, such as changing his or her login password. Some of the tasks that require elevated privilege may not immediately be obvious, though -- such as the ping command, which must send and listen for control packets on a network interface.
Setuid and setgid flags on a directory have an entirely different meaning. Directories with the setuid/setgid permission will force all files and sub-directories created in them to be owned by the directory owner/group and not the user/group of the user creating the file.
further reference:
http://en.wikipedia.org/wiki/Setuid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 04:00 AM
07-26-2006 04:00 AM
Re: setgid command
Example from a Red Hat study guide.
You want a directory to inherit its default ownership from someone other than the creating user.
mkdir oracledb
chmod 3775 oracledb/
chown oracle:dba oracledb/
su - sprotter
cd /home/oracledb
touch sprotterfile
Group ownership will show dba
Try it.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 04:12 AM
07-26-2006 04:12 AM
Re: setgid command
When you *copy* text, verbatim, from another source, it is proper to indicate that you are quoting another work and in doing so, provide citation threeof! Open-source licensing aside, too, I'm old-school: copying without acknowledgement is plain old plagiarism.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 04:17 AM
07-26-2006 04:17 AM
Re: setgid command
To set the 'setgid' bit one uses an octal number of the form:
# chmod 2nnn
...using:
# chmod 3nnn
...sets both the 'setgid' and the 'sticky' bit. See the manpages for 'chmod(1) and/or 'chmod(2)'
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 04:26 AM
07-26-2006 04:26 AM
Re: setgid command
when i copy from somewhere, i used to provide the link as well, the reason is same as u told. i thought that is enough. if not, how i can do that.
***when reading a text of two or more lines, the writers "english" will tell whether that is original or not.isnt***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 04:47 AM
07-26-2006 04:47 AM
Re: setgid command
No, the English (style) used is not an acceptable excuse for a lack of a proper citation. To ask me to discern *your* words from those written by someone else, presumes that I know both your style and the writer's style and background. While I am sensitive to cadence and form, that's not fair.
I have witnessed many non-native English folks write and speak more properly than a large number of American English-raised individuals!
It proper to place double quotation marks around vertatim passages of text. Another technique that I believe works well (for instance, here) is to delineate the material thusly:
/* begin_quote */
In the beginning was the Word...
/* end_quote */
Now, for anyone who thinks that I am picking only on you, I am not. I have seen other instances of this, too. Your post just happened to be the most recent one, and I think that this is something that we all could do well to remember.
_end_rant_
Regards!
...JRF...
/* no points for this post, please */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 05:00 AM
07-26-2006 05:00 AM
Re: setgid command
/* Now, for anyone who thinks that I am picking only on you, I am not. I have seen other instances of this, too. Your post just happened to be the most recent one, and I think that this is something that we all could do well to remember. */
the first "anyone" is me. but i like my "teacher" who always scolds me.
as one or two days back clay (i am sorry if its wrong) told, its difficult to work with olympian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 05:01 AM
07-26-2006 05:01 AM
Re: setgid command
-- and to add to Jim's rant, it is simply rude and your momma should whup you for it.
I have seen cases where some of my C code was cut-and-pasted and survived absolutely intact other than my authorship comments (which I'm sure were only inadvertently omitted). I only mention that because it would be difficult to discern one's English speaking ability (which I ain't known for nohow) in C but plagiarism is still plagiarism. The only sin in my view that is worse than plagiarism is falsifying data.
Be very glad you are not one of my former students because you would have just flunked the course.
Food for thought, Clay
No points, please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 05:39 AM
07-26-2006 05:39 AM
Re: setgid command
most of the time, these olympians write very crisp. i am not able to understand that crisp.
"Be very glad you are not one of my former students because you would have just flunked the course."
means what?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 05:44 AM
07-26-2006 05:44 AM
Re: setgid command
And what about falsifying plagiarism -- when you not only have not done your own work, but no one else has either?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2006 07:40 AM
07-26-2006 07:40 AM
Re: setgid command
As for the 'sin" of plagiarizing falsified data, then I don't really consider that "original" sin -- that there is just amplifying noise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2006 07:24 AM
09-13-2006 07:24 AM
Re: setgid command
Previous post: "do this: ps -ef | grep This"
Your post: "type this: ps -ef | grep -i this"
All you nitpickers are guilty of this. Frankly I don't care where the "text" answer comes from as long as it's the answer. If it's a different method of finding the answer, fine please post it, but the above example is not a new method. If it's code that someone wrote like Clay's caljd, then by all means give the proper credit.
Oh, and you didn't even answer the author's question with your actual answer.