- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to fix the mistake "chown root *" at root dir ...
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
Forums
Discussions
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
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-01-2008 03:34 AM
01-01-2008 03:34 AM
How to fix the mistake "chown root *" at root dir /
The result is: the system can not list the logic volumns. And when I execute vgdisplay, there will be such error message:
vgdisplay: /etc/lvmconf//lvm_lock: Permission denied
OS: HP-UX 11.11
Does anyone know how to fix this mistake.
Thanks very much!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2008 03:39 AM
01-01-2008 03:39 AM
Re: How to fix the mistake "chown root *" at root dir /
if you can execute swverify , you can
swverify -F \* and looking swverify log at the /var/adm/sw , you can fix the problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2008 04:26 AM
01-01-2008 04:26 AM
Re: How to fix the mistake "chown root *" at root dir /
>Hasan: swverify -F \*
The -F option should fix the ownership. But it wouldn't hurt to see what was fixed in the logs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2008 05:34 AM
01-01-2008 05:34 AM
Re: How to fix the mistake "chown root *" at root dir /
Are you telling the whole story? If I change the ownership of '/usr/sbin/vgdisplay' from "root:sys" to "root:root" it still works for me on 11.11.
While 'swverify -F \*' will repair ownership *and* permissions on files represented in the IPD (Installed Product Database) recorded by the SD utilities (e.g. 'swinstall'), a recursive 'chown' from '/' may have damaged far more files and directories than 'swverify' will repair. You will need to do a server-wide analysis of your files and directories!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2008 07:47 AM
01-01-2008 07:47 AM
Re: How to fix the mistake "chown root *" at root dir /
chown -R *
chmod -R *
rm -r *
The / directory is a very dangerous location -- always perform tasks from a safe directory and test dangerous commands using echo first:
echo chown root:root *
The * character itself can produce unexpected results as the shell replaces the * with matching filenames (assuming that the shell's standard filename expansion +f has been turned on). The above echo command reports what the shell will do to the * character. Remove the special meaning for * and you will see:
echo "*"
*
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2008 12:10 PM
01-01-2008 12:10 PM
Re: How to fix the mistake "chown root *" at root dir /
Bill's point is very well-taken:
> "...change all your Unix servers (HP-UX, Linux, Sun, AIX, etc) so that $HOME for root is another directory. The two most common locations are /root and /home/root."
My personal preference is to create a directory named '/root' as the ${HOME} for the root user. This is NOT created as a mountpoint. Rather, as a mere directory of '/' the '/root' directory can house a the root's profile and a few other key files and be immediately available in single-user mode.
In contrast, '/home/root' would be subordinate to the '/home' mountpoint and would require that '/home' be mounted in single-user mode to access its contents.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2008 05:21 PM
01-01-2008 05:21 PM
Re: How to fix the mistake "chown root *" at root dir /
Just tried Hasan's tip. And it works!!
:)
Thanks very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2008 12:14 AM
01-02-2008 12:14 AM