- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- wu-ftpd not setting home directory correctly
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
04-03-2008 07:42 AM
04-03-2008 07:42 AM
wu-ftpd not setting home directory correctly
We have the following ftp account setup:
hhc:x:732:100:VMMS Scanner:/database/vmms/db/hhdown:/bin/sh
When the hhc account logged into the ftp server a month ago (via a script), it showed the user logging in OK, the home directory set right and a file transfer that traversed up one level worked fine:
Mar 3 11:21:35 vgandj ftpd[11160]: command: PASS password^M
Mar 3 11:21:35 vgandj ftpd[11160]: <--- 230 User hhc logged in.
Mar 3 11:21:35 vgandj ftpd[11160]: FTP LOGIN FROM 10.3.1.18 [10.3.1.18], hhc
Mar 3 11:21:35 vgandj ftpd[11160]: command: PWD^M
Mar 3 11:21:35 vgandj ftpd[11160]: <--- 257 "/database/vmms/db/hhup" is current directory.
Mar 3 11:21:35 vgandj ftpd[11160]: command: TYPE I^M
Mar 3 11:21:35 vgandj ftpd[11160]: <--- 200 Type set to I.
Mar 3 11:21:35 vgandj ftpd[11160]: command: PORT 10,3,1,18,19,48^M
Mar 3 11:21:35 vgandj ftpd[11160]: <--- 200 PORT command successful.
Mar 3 11:21:35 vgandj ftpd[11160]: command: STOR /database/vmms/db/hhup/202010/
CHECK.ME^M
Mar 3 11:21:35 vgandj ftpd[11160]: <--- 150 Opening BINARY mode data connection
for /database/vmms/db/hhup/202010/CHECK.ME.
Mar 3 11:21:35 vgandj ftpd[11160]: <--- 226 Transfer complete
-----
Now, whenever the hhc accout logs into the ftp server, it doesn't show the right home directory, and cannot traverse up one level to send a file and gets this error:
Apr 2 09:35:59 vgandj ftpd[6458]: <--- 230 User hhc logged in. Access restrictions apply.
Apr 2 09:54:03 vgandj ftpd[7294]: FTP LOGIN FROM 10.3.1.18 [10.3.1.18], hhc
Apr 2 09:54:03 vgandj ftpd[7294]: command: PWD^M
Apr 2 09:54:03 vgandj ftpd[7294]: <--- 257 "/" is current directory.
Apr 2 09:54:03 vgandj ftpd[7294]: command: TYPE I^M
Apr 2 09:54:03 vgandj ftpd[7294]: <--- 200 Type set to I.
Apr 2 09:54:03 vgandj ftpd[7294]: command: PORT 10,3,1,18,4,168^M
Apr 2 09:54:03 vgandj ftpd[7294]: <--- 200 PORT command successful.
Apr 2 09:54:03 vgandj ftpd[7294]: command: STOR /database/vmms/db/hhup/202010/CHECK.ME^M
Apr 2 09:54:03 vgandj ftpd[7294]: <--- 553 Could not determine cwdir: No such file or directory.
So, it used to be able to chroot up a level to /database/vmms/db/hhup from its home directory of /database/vmms/db/hhdown -- but now when it logs in, it doesn't show the right home directory, and attempts to send a file to another directory errors.
All file permissions are OK to have the hhc send files to the directory in question.
drwxrwxrwx 7 gbg users 4096 Apr 3 09:24 hhdown
drwxrwxrwx 7 gbg users 4096 Apr 2 09:52 hhup
The wu-ftpd configuration has not changed. What coud the problem be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 08:45 AM
04-03-2008 08:45 AM
Re: wu-ftpd not setting home directory correctly
/database/vmms/db/hhdown
And you chroot to that directory, that becomes "/", so you can't go up.
You must modify your home directory to be:
/database/vmms/db/./
And your scripts to do:
cd /hhup
cd /hhdown
When required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 10:25 AM
04-03-2008 10:25 AM
Re: wu-ftpd not setting home directory correctly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 11:06 AM
04-03-2008 11:06 AM
Re: wu-ftpd not setting home directory correctly
That is not possible. Chroot was not working before.
>>> Mar 3 11:21:35 vgandj ftpd[11160]: <--- 257 "/database/vmms/db/hhup" is current directory.
This message means that the user was not chrooted.
>>> Apr 2 09:54:03 vgandj ftpd[7294]: <--- 257 "/" is current directory.
This message means that the user is now chrooted.
You won't be able to go up. What you have to do is to change the home directory to one level up. You can then create symbolik links to avoid changing your scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 11:23 AM
04-03-2008 11:23 AM
Re: wu-ftpd not setting home directory correctly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 12:09 PM
04-03-2008 12:09 PM
Re: wu-ftpd not setting home directory correctly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 12:33 PM
04-03-2008 12:33 PM
Re: wu-ftpd not setting home directory correctly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 12:41 PM
04-03-2008 12:41 PM
Re: wu-ftpd not setting home directory correctly
rpm -qa | grep -i ftp
chkconfig --list | grep -i ftp
Do you have the user listed in ftpaccess?