- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: allow cp -p to keep owner
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
тАО06-02-2008 01:55 PM
тАО06-02-2008 01:55 PM
allow cp -p to keep owner
I'm looking if there is a way to allow a standard user when copies a file with cp-p to keep the original file owner. It's ok with HP-UX 11i machines and this command works as I wrote, with REHL box don't. Even with local or nfs file systems.
Thank you.
bests
Romano
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 02:30 PM
тАО06-02-2008 02:30 PM
Re: allow cp -p to keep owner
# ls -la /home/ferreiri/.bashrc
-rw-r--r-- 1 ferreiri ferreiri 124 jun 18 2007 /home/ferreiri/.bashrc
# cp /home/ferreiri/.bashrc /tmp/prueba
# ls -la /tmp/prueba
-rw-r--r-- 1 root root 124 jun 2 18:29 /tmp/prueba
# cp -p /home/ferreiri/.bashrc /tmp/prueba
# ls -la /tmp/prueba
-rw-r--r-- 1 ferreiri ferreiri 124 jun 18 2007 /tmp/prueba
Can you post the same test done at your system?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 02:50 PM
тАО06-02-2008 02:50 PM
Re: allow cp -p to keep owner
> # cp -p [...]
As I understand it, a _standard_ user is not
normally allowed to create files owned by
some other user. Allowing this would tend to
make a joke out of disk quotas.
> Can you post the same test done at your
> system?
Or the actual commands you used and their
results. Actual evidence (of the impossible)
is more convincing than vague descriptions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 03:32 PM
тАО06-02-2008 03:32 PM
Re: allow cp -p to keep owner
here the results:
user: pino
-rw-rw-r-- 1 romano users 69 2008-06-02 23:10 rocco
> cp -p rocco ../pino/
> ll ../pino/
-rw-rw-r-- 1 pino users 69 2008-06-02 23:10 rocco
thnk you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 03:33 PM
тАО06-02-2008 03:33 PM
Re: allow cp -p to keep owner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 06:33 PM
тАО06-02-2008 06:33 PM
Re: allow cp -p to keep owner
That does not make it a good idea to let "a
standard user" create files which some other
user owns. It's only one of the reasons, not
the only reason. For another example,
consider a file with rw-r--r-- permissions.
After you create it, if someone else owns it,
how do you delete it? You don't have
permission to delete it, and you don't have
permission to change its permissions.
Allowing this would not be wise.
> here the results:
I want to see where this works "ok" on an
"HP-UX 11i" system. (And what, exactly, is
"HP-UX 11i"? Show "uname -a" output.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 10:30 PM
тАО06-02-2008 10:30 PM
Re: allow cp -p to keep owner
In Linux, it's generally disabled by design. If you use a XFS filesystem, you can enable it by setting /proc/sys/fs/xfs/restrict_chown to 0. The default value is 1. Other filesystem types don't seem to allow this feature at all.
In HP-UX, it's a system-wide feature controlled by setprivgrp() or the /etc/privgrp file.
If the /etc/privgrp file contains the string "-g CHOWN" when the system boots, anyone is allowed to change the ownerships of files. I think this used to be the default on some *old* HP-UX default installations.
If a HP-UX security auditor is worth his salt, he/she will certainly check this setting and ask for justification if it's enabled.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 10:33 PM
тАО06-02-2008 10:33 PM
Re: allow cp -p to keep owner
uname -a
HP-UX lochp10 B.11.11 U 9000/800 1560605287 unlimited-user license
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 11:34 PM
тАО06-02-2008 11:34 PM