- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to Set SUID so files owned by owner of directo...
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
Discussions
Discussions
Forums
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
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
тАО01-06-2010 07:10 AM
тАО01-06-2010 07:10 AM
/home/cognos directory. The files are owned by samu11. How do I make so any files put in /home/cognos are always owned by cognos user.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2010 07:16 AM
тАО01-06-2010 07:16 AM
SolutionThe best you can do is set the 'setgid' bit on the "/home/cognos" directory. Then, when any user who has permission to write into that directory does so, the files added will have a _group_ ownership of the "/home/cognos" directory.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2010 07:33 AM
тАО01-06-2010 07:33 AM
Re: How to Set SUID so files owned by owner of directory ?
but SUID on a directory does not.
But is it possible to change the owner of the file in a directory to have the same owner as the directory itself.
We got different users put out file in a directory but just want one owner of all files in there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2010 07:37 AM
тАО01-06-2010 07:37 AM
Re: How to Set SUID so files owned by owner of directory ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2010 07:38 AM
тАО01-06-2010 07:38 AM
Re: How to Set SUID so files owned by owner of directory ?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2010 07:41 AM
тАО01-06-2010 07:41 AM
Re: How to Set SUID so files owned by owner of directory ?
> The SGID worked. but SUID on a directory does not.
That's correct. The idea of a 'setuid' bit is that when set for an executable, the executable runs with an effective UID of the executable file's owner. The 'passwd' command is one classic example. That command runs with an effective UID of 'root'.
This said, of course, if a SETUID executable were to create a file, then the owner of the file would be that of the effective UID.
You do NOT want to travel this road except in very, very special cases. As Patrick and Pete said, setup a 'cron'task to 'chown' what you need.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2010 07:47 AM
тАО01-06-2010 07:47 AM
Re: How to Set SUID so files owned by owner of directory ?
And of course , kudos to JRF for explaining the SUID concept.