- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- can a file 's owner be chaged to another user?
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
08-06-2002 12:39 AM
08-06-2002 12:39 AM
can a file 's owner be chaged to another user?
I login hp_un in user accout A, and change the owner of file x(owner is A) to user B,
it failed with:
chown: X: Not owner
why?
A and B is not root.
Thanks
sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 12:46 AM
08-06-2002 12:46 AM
Re: can a file 's owner be chaged to another user?
kibo:ss7admin> ll
total 0
-rw-rw-rw- 1 ss7admin ocadmin 0 Aug 6 09:57 file1
kibo:ss7admin> id
uid=101(ss7admin) gid=101(ocadmin)
kibo:ss7admin> whereis chown
chown: /sbin/chown /usr/bin/chown /usr/share/man/man1.Z/chown.1 /usr/share/man/m
an2.Z/chown.2
kibo:ss7admin> what /usr/bin/chown
/usr/bin/chown:
$Revision: 80.1 $
kibo:ss7admin> chown ocmpadm:ocadmin file1
kibo:ss7admin> ll
total 0
-rw-rw-rw- 1 ocmpadm ocadmin 0 Aug 6 09:57 file1
kibo:ss7admin> type chown
chown is /usr/bin/chown
kibo:ss7admin> chown ss7admin:ocadmin file1
file1: Not owner
kibo:ss7admin> ll
total 0
-rw-rw-rw- 1 ocmpadm ocadmin 0 Aug 6 09:57 file1
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 12:51 AM
08-06-2002 12:51 AM
Re: can a file 's owner be chaged to another user?
Direct from the chown manpage, you will need to use setprivgrp. You can create a privgroup file in /etc i.e. /etc/privgroups as far as I recall off-hand for settings to stay permanent.
========================================
In order to change the owner or group, you must own the file and have the CHOWN privilege (see setprivgrp 1M)). If either command is invoked on a regular file by other than the superuser, the set-user-ID and set-group-ID bits of the file mode (04000 and 02000 respectively) are cleared. Note that a given user's or group's ability to use this
command can be restricted by setprivgrp (see setprivgrp(1M)).
========================================
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 12:55 AM
08-06-2002 12:55 AM
Re: can a file 's owner be chaged to another user?
your output is right.
The owner should provide or give the ownership to another person to a file.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 01:25 AM
08-06-2002 01:25 AM
Re: can a file 's owner be chaged to another user?
Check the permissions of chown executable.
should be like this
-r-xr-xr-x 1 bin bin
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 04:09 AM
08-06-2002 04:09 AM
Re: can a file 's owner be chaged to another user?
Please confirm that it hasn't been replaced by another chown!
-Gerald-