- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sftp chroot (revisited)
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
03-09-2009 08:15 AM
03-09-2009 08:15 AM
Using ProFTP for FTP works great with no issues.
I am attempting to use SSH 5.x (HP-UX Secure Shell-A.05.10.008) to do the same with the ChrootDirectory directive for SFTP and have a question.
The chroot functionality in ssh/sftp does in fact work. But it is required that the chrooted directory (e.g. /home/sftptest ) be owned by root with no write perms for the user).
This is great except that I would like to have the chroot'd sftp user to be able to write into their home directory. Because of the root ownership and write restriction requirement they cannot.
The only solution I have seen is to create a subdirectory under their chrooted directory and have the user own that directory. This would also give other multiple users the ability to see all the directories.
I am thinking this should not be this difficult. Chrooted FTP has been around for a long time. Am I missing something ?
Any others have any comments or experiences?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2009 12:04 PM
03-09-2009 12:04 PM
Solution> users the ability to see all the
> directories. [...]
Why? Why can't you set more restrictive
permissions on that user-owned directory?
If you'd like a more detailed answer, it
might help to include more details in your
question. Like, say, actual configuration
file data, "ls -l" listings, and so on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2009 12:43 PM
03-09-2009 12:43 PM
Re: sftp chroot (revisited)
/incoming/client1
/incoming/client2
/incoming/client3
Lock the ftp users of client1, client2, client3 into their respective directories and allow them to write.
One the back side there is one admin login that can get or put files from all the clients directories so the group membership needs to be the same for all in order to allow the admin login to get/put/delete.
I have done this for many years with ProFTP but am working on implementing the same type of solution using SFTP.
Directory would look like this:
drwxrwx-- client1 clients /incoming/client1
drwxrwx-- client2 clients /incoming/client2
sshd_config might look like this.
Match user client1
ChrootDirectory /incoming/%u
Match user client2
ChrootDirectory /incoming/%u
The admin user would be a member of the client group and not restricted. It could then add or remove files from either directory.
I could certainly create more subdirectories under each client but was hoping not to as I would have to change a lot of scripting for each client.
This type of layout works great with ProFTP, locking each user into their respective directory and allowing write access to the chroot.
I was simply hoping to implement the same structure using ssh and limit the changes to the current process/structure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2009 01:46 PM
03-09-2009 01:46 PM
Re: sftp chroot (revisited)
> drwxrwx-- client2 clients /incoming/client2
_ ____^^^
Why let the group do _anything_? Isn't that
the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2009 03:04 PM
03-09-2009 03:04 PM
Re: sftp chroot (revisited)
As for what you're missing about chroot FTP, the main thing is probably that SFTP and FTP have nothing in common other than a superficially similar UI and purpose. The actual mechanics are completely different at almost every level. I don't think the OpenSSH developers had untrusted users in mind when they wrote sftp-server.