- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: suid on directory does not change ownership to...
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
тАО10-20-2008 09:17 AM
тАО10-20-2008 09:17 AM
# ls -ld /app/test
drwsrwsr-x 2 subir01 eteam 1024 Oct 20 11:58 /app/test
If user "clyde18" touches file in above dir, I was expecting the owner to be subir01 (according to SUID set on directory) . Why is OS setting owner to that of the userid who touched file.
$ id
uid=12216(clyde18) gid=206(eteam)
$ touch /app/test/myperms
$ ls -ld /app/test/myperms
-rw-rw---- 1 clyde18 eteam 0 Oct 20 12:11 /app/test/myperms
Thanks for help in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2008 09:30 AM
тАО10-20-2008 09:30 AM
SolutionSetting u+s does not make files created in
that directory owned by owner of the directory. Only the group if g+s is set.
The man pages are not kept up to date
nowadays.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2008 09:35 AM
тАО10-20-2008 09:35 AM
Re: suid on directory does not change ownership to that of owner of directory ??
The directory's *group* owner is what will be conferred to the newly created file when the the directory has its 'setgid' bit set.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2008 11:35 AM
тАО10-20-2008 11:35 AM
Re: suid on directory does not change ownership to that of owner of directory ??
Then do you know of a way so I can redirect user's history file to a directory so he can not delete or edit it. Right now, the .sh_history file is owned by the user by default and so he can modify it.
.profile of user "dp" below
======
HISTFILE="$ARCHIVE_DIR/.sh_history_$LOGNAME_PID_$$" ; export HISTFILE
output in $ARCHIVE_DIR
Right now, the dp user can edit this file and delete the commands he entered.
-rw------- 1 dp escript 174 Oct 20 14:33 .sh_history_DP_PID_8243
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2008 11:44 AM
тАО10-20-2008 11:44 AM
Re: suid on directory does not change ownership to that of owner of directory ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2008 11:48 AM
тАО10-20-2008 11:48 AM
Re: suid on directory does not change ownership to that of owner of directory ??
> Then do you know of a way so I can redirect user's history file to a directory so he can not delete or edit it. Right now, the .sh_history file is owned by the user by default and so he can modify it.
You're asking for your cake and to eat it too.
The shell needs to have write-access to the directory in which you tell it to create a history file. Directory write-access infers the ability to delete a file. File write-ability means that all or some the data within can be munged.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2008 12:37 PM
тАО10-20-2008 12:37 PM
Re: suid on directory does not change ownership to that of owner of directory ??
The goal was to monitor user activities (once they sudo to application acct) so if they rm a file, we (sys admins and mgrs) can look in the history log who did what. Mgmt wanted to prevent users from cleaning their own .sh_history file after some nefarious activity.
But seems like we can't do it so may have to suggest powerbroker tool (which costs money).
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2008 11:46 PM
тАО10-20-2008 11:46 PM
Re: suid on directory does not change ownership to that of owner of directory ??
No it doesn't if you manually create an empty file there. But this doesn't really help.
>File write-ability means that all or some the data within can be munged.
Unfortunately this is what will allow the data to be munged.
What Sammy needs is a file with append only access, a pipe. Unfortunately that won't work as a history file.