home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / hp / 14414 < prev    next >
Encoding:
Text File  |  1992-12-29  |  5.8 KB  |  130 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!news.mentorg.com!news
  3. From: mark_silbernagel@mentorg.com
  4. Subject: Re: Need Restricted FTP
  5. Summary: sub-login anon ftp
  6. Sender: news@news.mentorg.com (News User)
  7. Message-ID: <1992Dec29.234316.15956@news.mentorg.com>
  8. Date: Tue, 29 Dec 1992 23:43:16 GMT
  9. References: <1992Dec11.173941.25609@unison.com> <frank.724454838@fam168>
  10. Nntp-Posting-Host: mgpdxmms.mentorg.com
  11. Organization: Mentor Graphics Corporation
  12. Lines: 116
  13.  
  14. In article <frank.724454838@fam168> Frank Hoffmann <fh.pad@sni.de> writes:
  15. >jk@unison.com (Joseph Konton) writes:
  16. >
  17. >>My company has a need to provide ftp service to a customer in order to
  18. >>exchange files with them.
  19. >
  20. >>In my reading of the manual, it indicates that an anonymous user is 
  21. >>limited to the directory structure /users/ftp, and that the user is
  22. >>chrooted such that that directory appears to be the root directory.
  23. >
  24. >>I'd like to be able to do this for our customer so that they can only
  25. >>access the files and directories that we wish them to have access to.
  26. >
  27. >>Anonymous ftp is not a suitable solution as we do not want just anyone
  28. >>to have access to these files.
  29. >
  30. >>Is there a way to accomplish this?  Perhaps a customized version of the ftp
  31. >>daemon?
  32. >
  33.  
  34. Frank,
  35.  
  36. You can establish an ./etc/passwd file within the /users/ftp directory such
  37. that
  38. issuing a 'user xyz' command after logging in anonymously (as user 'ftp') then
  39. places you into a second home directory lower in the /users/ftp hierarchy. We
  40. did this for exchanging sensitive information with our vendors, making it
  41. more secure by setting permissions for the second user account to owner only.
  42.  
  43. This feature of HP's ftpd is called "sub-login"s and is discussed in the man
  44. page for ftpd. I've attached an excerpt.
  45.  
  46. Between that and using /usr/adm/inetd.sec, on the 'firewall' machine, makes the
  47. whole thing reasonably useful.
  48.  
  49. Mark Silbernagel                |
  50. Mentor Graphics Corporation     | ...Don't let the sands of time
  51. 8005 S.W. Boeckman Road         |    get in your shorts      ;')
  52. Wilsonville, OR  97070-7777     |
  53. (503) 685-4738                  |    mark_silbernagel@mentorg.com
  54.  
  55. --
  56.  
  57. From HP's ftpd man page, HP-UX ver 8.05.
  58.  
  59. ... quoted in part, and without permission.
  60.  
  61. " In order to permit anonymous FTP, there must be an entry in the
  62.       passwd(4) database for an account named ftp.  The password field
  63.       should be *, the group membership should be guest, and the login shell
  64.       should be /bin/false.  For example (assuming the guest group ID is
  65.       10):
  66.  
  67.            ftp:*:500:10:anonymous ftp:/users/ftp:/bin/false
  68.  
  69.       The anonymous ftp directory should be set up as follows:
  70.  
  71.       ~ftp    The home directory of the ftp account should be owned by user
  72.               ftp and mode 555 (not writable).  Since ftpd does a chroot to
  73.               this directory, it must have the following subdirectories and
  74.               files:
  75.  
  76.               ~ftp/bin  This directory must be owned by root and mode 555
  77.                         (not writable).  It should contain a copy of
  78.                         /bin/ls.  This is needed to support directory
  79.                         listing by ftpd.  The command should be mode 111
  80.                         (executable only).  If the FTP account is on the
  81.                         same file system as /bin, ~ftp/bin/ls can be hard
  82.                         link, but it may not be a symbolic link, because of
  83.                         the chroot.  The command must be replaced when the
  84.                         system is updated.
  85.  
  86.               ~ftp/etc  This directory must be owned by root and mode 555
  87.                         (not writable).  It should contain versions of the
  88.                         files passwd, group, and logingroup.  See passwd(4)
  89.                         and group(4).  These files must be owned by root and
  90.                         mode 444 (readable only). These are needed to map
  91.                         user and group ids in the LIST command, and to
  92.                         support (optional) sub-logins of anonymous FTP.
  93.                         Sub-logins can sometimes be used to allow access to
  94.                         particular files by only specific remote users (who
  95.  
  96.  Hewlett-Packard Company            - 3 -      HP-UX Release 8.05: June 1991
  97.  
  98.  ftpd(1M)                                                           ftpd(1M)
  99.                   Requires Optional ARPA Services Software
  100.  
  101.                         know the sub-login password) without giving those
  102.                         remote users logins on the system.  A sub-login user
  103.                         would access the system via anonymous ftp, and then
  104.                         use USER and PASS to change to the sub-login user.
  105.  
  106.               ~ftp/etc/passwd
  107.                         This file should contain entries for the ftp user
  108.                         and any other users who own files under the
  109.                         anonymous ftp directory.  Such entries should have *
  110.                         for passwords.  ~ftp/etc/passwd should also contain
  111.                         entries for any desired anonymous FTP sub-logins.
  112.                         The sub-logins must have passwords, which must be
  113.                         encrypted as in passwd(4).  Group IDs must be listed
  114.                         in the anonymous FTP group file, ~ftp/etc/group.
  115.                         The path names of home directories in
  116.                         ~ftp/etc/passwd must be with respect to the
  117.                         anonymous FTP home directory.  A sub-login home
  118.                         directory should be owned by the sub-login user ID.
  119.                         The shell field is ignored, and can be empty.
  120.  
  121.  For example, the anonymous FTP sub-login name subftp
  122.                         would have an entry in the FTP passwd file that
  123.                         resembles:
  124.  
  125.                              subftp:bAg6vI82aq5Yt:501:10:ftp sub-
  126.                              login:/subftp:
  127. "
  128.  
  129. end quote, end article.
  130.