- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- chroot returns Not Owner error
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
02-15-2001 12:51 PM
02-15-2001 12:51 PM
chroot returns Not Owner error
I created a user chris in /home/chris, in his directory, created the etc, usr/bin, usr/lib subdirectories and copied the files
/etc/passwd
/etc/group
/usr/bin/ls
/usr/bin/sh
/usr/lib/dld.sl
/usr/lib/libdld.1
into chris home directories respectively.
In his .profile, I have the entry
/usr/sbin/chroot /home/chris /usr/bin/sh
When I tried to login as him I got
/home/chris: NOT OWNER
I have not put any security measures so what could be the reason of this problem.
The / directory has:
drwxr-xr-x 4 root root 1024 Feb 15 12:24 home
The /home directory contains:
drwxr-xr-x 4 chris users 1024 Feb 15 12:25 chris
The /home/chris contains:
drwxrwxrwx 2 chris users 1024 Feb 15 12:32 etc
drwxrwxrwx 4 chris users 1024 Feb 15 12:30 usr
Any help is always appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2001 11:48 PM
02-15-2001 11:48 PM
Re: chroot returns Not Owner error
Something like .dt or .profile?
Is this on a local or on a NFS filesystem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2001 12:18 AM
02-16-2001 12:18 AM
Re: chroot returns Not Owner error
You are missing out the following files in your usr/lib directory:
- libc.2
- libcurses.1
- libdld.2
Perform the command using root (which has the privilege to run the process):
# chroot /home/chris /usr/bin/sh
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2001 09:39 AM
02-16-2001 09:39 AM
Re: chroot returns Not Owner error
I'm using HPUX 10.20. The ls -la in /home/chris returns:
drwxr-xr-x 4 chris users 1024 Feb 15 12:25 .
drwxrwxrwx 4 root root 1024 Feb 15 12:24 ..
-rw-r--r-- 1 chris users 814 Feb 15 12:24 .cshrc
-rw-r--r-- 1 chris users 347 Feb 15 12:24 .exrc
-rw-r--r-- 1 chris users 341 Feb 15 12:24 .login
-rw-r--r-- 1 chris users 446 Feb 15 12:24 .profile
-rw------- 1 chris users 776 Feb 16 09:37 .sh_history
drwxrwxrwx 2 chris users 1024 Feb 15 12:32 etc
drwxrwxrwx 4 chris users 1024 Feb 15 12:30 usr
The chroot works if executed by root. This will only affect the root login. How will I make it work so when chris login so that he will be chrooted to his home directory only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2001 09:46 AM
02-16-2001 09:46 AM
Re: chroot returns Not Owner error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2001 02:29 AM
02-19-2001 02:29 AM
Re: chroot returns Not Owner error
Have you configured to use something like command history?
I don't think you need to be root to use chroot. But i would test the following:
remove the chroot from the .profile, login as chris and try to start a new shell with chroot ....
Let us know what the result is.
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2001 07:29 AM
02-19-2001 07:29 AM
Re: chroot returns Not Owner error
WARNINGS
command cannot be in a shell script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2001 04:33 PM
02-20-2001 04:33 PM
Re: chroot returns Not Owner error
Let me know if you have any other idea on how to restrict a user to be confined in his own home directory aside from chroot.
I tried it on another HPUX machine and have the same problem. I might be using chroot incorrectly.
Carlos: I'm using /usr/bin/sh (not a shell script) as my command for chroot.
i.e. /usr/sbin/chroot /home/chris /usr/bin/sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2001 10:52 PM
02-20-2001 10:52 PM
Re: chroot returns Not Owner error
sorry i didn't find it til now, but the answer is in the man page. man 1M chroot says:
"This command is restricted to users with appropriate privileges."
So you have to use something like sudo or stickybits to use this command as a normal user.
Hope this helps.
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2001 12:36 AM
02-21-2001 12:36 AM
Re: chroot returns Not Owner error
There are a few holes in this method (shelling out from vi, etc.), but you can lock it down pretty tight if you give him only the binaries he needs in /usr/rbin.
Daren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2001 06:54 AM
02-21-2001 06:54 AM
Re: chroot returns Not Owner error
Hope this helps.
...jcd...