HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp: restrict user to access /tmp/test
Operating System - HP-UX
1833187
Members
2893
Online
110051
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
Go to solution
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
12-24-2006 07:12 PM
12-24-2006 07:12 PM
I know the way can configure ftp users to access his home directory only.
BUT, Is it possible to restrict FTP users to access /tmp/test only?
BUT, Is it possible to restrict FTP users to access /tmp/test only?
Hero
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2006 07:29 PM
12-24-2006 07:29 PM
Solution
Shalom,
Yes,
make /tmp/test the home directory of the user in /etc/passwd and use ftpaccess to chroot the user.
SEP
Yes,
make /tmp/test the home directory of the user in /etc/passwd and use ftpaccess to chroot the user.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2006 07:12 PM
12-26-2006 07:12 PM
Re: ftp: restrict user to access /tmp/test
This how it is posseble:
ps if you have a older system than 11.00 you must download a ftp berkly version to do this
Add â -aâ to ftpd in /etc/inetd.conf
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -a
Create the file /etc/ftpd/ftpaccess (anonftp can be any other group-name but is preferred).
# echo â class any anonymous,guest,real *â > /etc/ftpd/ftpaccess
# echo â guestgroup anonftpâ >> /etc/ftpd/ftpaccess
# echo â log commands guestâ >> /etc/ftpd/ftpaccess
Create the anonftp group:
# /appl/tsu/cur/support/bin/AddGroup.pl â gid ???? anonftp
Add all available shells to /etc/shells.
add /usr/bin/false to /etc/shells
After adding a user to the system for restricted ftp youâ ll have to change the userâ s shell to /usr/bin/false, add ./ to the homedirectory and set the password to non-expiring (donâ t use â vipwâ but use â samâ to do this). An example /etc/passwd entry of a restricted ftp user:
tsuftp:*:4004:4001:TSU Ftp-User,,,:/tmp/test/./,/usr/bin/false
Add the following files and dircetories to the users home directory (make sure the user cannont overwrite them!).
# mkdir ~ftpuser/usr ~ftpuser/usr/bin ~ftpuser/usr/lib ~ftpuser/etc
# cp /etc/group ~ftpuser/etc
# cp /etc/passwd ~ftpuser/etc
# cp /sbin/ls ~ftpuser/usr/bin
# cp /usr/lib/dld.sl ~ftpuser/usr/lib
# cp /usr/lib/libdld.1 ~ftpuser/usr/lib
The passwd file and group file are for user/group id resolving within the ftp session only. It does not hold the user's password.
ps if you have a older system than 11.00 you must download a ftp berkly version to do this
Add â -aâ to ftpd in /etc/inetd.conf
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -a
Create the file /etc/ftpd/ftpaccess (anonftp can be any other group-name but is preferred).
# echo â class any anonymous,guest,real *â > /etc/ftpd/ftpaccess
# echo â guestgroup anonftpâ >> /etc/ftpd/ftpaccess
# echo â log commands guestâ >> /etc/ftpd/ftpaccess
Create the anonftp group:
# /appl/tsu/cur/support/bin/AddGroup.pl â gid ???? anonftp
Add all available shells to /etc/shells.
add /usr/bin/false to /etc/shells
After adding a user to the system for restricted ftp youâ ll have to change the userâ s shell to /usr/bin/false, add ./ to the homedirectory and set the password to non-expiring (donâ t use â vipwâ but use â samâ to do this). An example /etc/passwd entry of a restricted ftp user:
tsuftp:*:4004:4001:TSU Ftp-User,,,:/tmp/test/./,/usr/bin/false
Add the following files and dircetories to the users home directory (make sure the user cannont overwrite them!).
# mkdir ~ftpuser/usr ~ftpuser/usr/bin ~ftpuser/usr/lib ~ftpuser/etc
# cp /etc/group ~ftpuser/etc
# cp /etc/passwd ~ftpuser/etc
# cp /sbin/ls ~ftpuser/usr/bin
# cp /usr/lib/dld.sl ~ftpuser/usr/lib
# cp /usr/lib/libdld.1 ~ftpuser/usr/lib
The passwd file and group file are for user/group id resolving within the ftp session only. It does not hold the user's password.
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