HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Where does the ~/ftp/etc/passwd files belong
Operating System - HP-UX
1836532
Members
4100
Online
110101
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
09-18-2006 08:40 AM
09-18-2006 08:40 AM
Where does the ~/ftp/etc/passwd files belong
Another restricted ftp question.
Looking at the man pages, it talks about creating the ~/ftp/etc/passwd and group file.
Using a restricted user, I only see the user ID and Group ID numbers when I do a dir.
I tried creating the etc/password and group file under the root of the guest user, I tried ftp/etc/ of the guest user, a system root of /ftp/etc/password. The root's directory
/homeroot/etc/password, /homeroot/ftp/etc/password.
I cann't figure out where wu-ftpd is looking. The guide says ~/ftp/etc/password. It's not clear to me who's home ~ refers to.
Please help.
Looking at the man pages, it talks about creating the ~/ftp/etc/passwd and group file.
Using a restricted user, I only see the user ID and Group ID numbers when I do a dir.
I tried creating the etc/password and group file under the root of the guest user, I tried ftp/etc/ of the guest user, a system root of /ftp/etc/password. The root's directory
/homeroot/etc/password, /homeroot/ftp/etc/password.
I cann't figure out where wu-ftpd is looking. The guide says ~/ftp/etc/password. It's not clear to me who's home ~ refers to.
Please help.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2006 08:50 AM
09-18-2006 08:50 AM
Re: Where does the ~/ftp/etc/passwd files belong
Youre reading in an extra /. The path for the files is ~ftp/etc. If you set the home directory for the ftp user to be /home/ftp, the path for the passwd file would be /home/ftp/etc/passwd.
--
Jeff Traigle
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2006 09:00 AM
09-18-2006 09:00 AM
Re: Where does the ~/ftp/etc/passwd files belong
I think tried that also
in the real /etc/password file for user1 I have :/dir1/dir2/dir3/./:
User user1 FTPs in and finds himself in /dir1/dir2/dir3/ and that looks like '/' to him.
As root, I create the file /dir1/dir2/dir3/etc/passwd and make the 'etc' directory and 'password' file world readable. As user1 I can do a DIR /etc/
and I see the passwd file. I do the DIR and still only see the numeric IDs.
That's when I started copying the passwd file to every other place I could think of that ftpd might be looking.
in the real /etc/password file for user1 I have :/dir1/dir2/dir3/./:
User user1 FTPs in and finds himself in /dir1/dir2/dir3/ and that looks like '/' to him.
As root, I create the file /dir1/dir2/dir3/etc/passwd and make the 'etc' directory and 'password' file world readable. As user1 I can do a DIR /etc/
and I see the passwd file. I do the DIR and still only see the numeric IDs.
That's when I started copying the passwd file to every other place I could think of that ftpd might be looking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2006 07:06 AM
09-21-2006 07:06 AM
Re: Where does the ~/ftp/etc/passwd files belong
I solved the problem. In case anyone else happens to find this thread while trying to solve a similar problem.....
There are two different versions of 'ls' on HPUX
/sbin/ls
/usr/bin/ls
The one in /usr/bin/ls calls routines in libraries under /usr/lib/ and it seems cannot use a different /etc/passwd.
The one under /sbin seems to be self contained and doesn't call other routines and can use a differnet /etc/password.
test-
/dir1/dir2/usr/bin/ls
/dir1/dir2/usr/lib/....
/dir1/dir2/etc/passwd and group
as root..
chroot /dir1/dir2/ /usr/bin/ls -l
if I copied the ls found in /usr/bin to my usr/bin, I got numbers for user and group id
if I copied the ls found in /sbin I got names.
I then completely removed the /usr/lib directory from under /dir1/dir2 and the ls from /sbin still worked.
Tested it from a restricted FTP session and all is Good.
Oh and the /etc/passwd does go under the FTP user's chroot directory I.e., the first part of the directory located in the real /etc/passwd file
in my case :/dir1/dir2/./:
There are two different versions of 'ls' on HPUX
/sbin/ls
/usr/bin/ls
The one in /usr/bin/ls calls routines in libraries under /usr/lib/ and it seems cannot use a different /etc/passwd.
The one under /sbin seems to be self contained and doesn't call other routines and can use a differnet /etc/password.
test-
/dir1/dir2/usr/bin/ls
/dir1/dir2/usr/lib/....
/dir1/dir2/etc/passwd and group
as root..
chroot /dir1/dir2/ /usr/bin/ls -l
if I copied the ls found in /usr/bin to my usr/bin, I got numbers for user and group id
if I copied the ls found in /sbin I got names.
I then completely removed the /usr/lib directory from under /dir1/dir2 and the ls from /sbin still worked.
Tested it from a restricted FTP session and all is Good.
Oh and the /etc/passwd does go under the FTP user's chroot directory I.e., the first part of the directory located in the real /etc/passwd file
in my case :/dir1/dir2/./:
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP