<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Securing ftp access in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395624#M199902</link>
    <description>Hi Tim,&lt;BR /&gt;Thought about using chroot (1M)?&lt;BR /&gt;&lt;A href="http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;admit=552267591+1097167757084+28353475&amp;amp;docId=200000063210548" target="_blank"&gt;http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;admit=552267591+1097167757084+28353475&amp;amp;docId=200000063210548&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
    <pubDate>Thu, 07 Oct 2004 11:50:54 GMT</pubDate>
    <dc:creator>Victor BERRIDGE</dc:creator>
    <dc:date>2004-10-07T11:50:54Z</dc:date>
    <item>
      <title>Securing ftp access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395623#M199901</link>
      <description>I have just set up a restricted ftp user in the following way (after browsing the forum)&lt;BR /&gt;&lt;BR /&gt;created user with /usr/bin/false as shell &amp;amp; home directory /homedir/./.&lt;BR /&gt;&lt;BR /&gt;created /etc/shells &amp;amp; added all possible entries including  /usr/bin/false&lt;BR /&gt;&lt;BR /&gt;created /etc/ftpd/ftpaccess with an entry  newuser ftponly  at the bottom of file&lt;BR /&gt;&lt;BR /&gt;edit /etc/inetd.conf &amp;amp; added -a flag to ftp daemon. run inetd -c&lt;BR /&gt;&lt;BR /&gt;My Question.&lt;BR /&gt;&lt;BR /&gt;User is restricted to ftp which is OK. Cannot telnet or login. When I ftp as this user I can cd / at the ftp prompt which lets me go to the root dir of the server. I expected to be only left go to the ftpuser's home dir which is what I want to do. Have I missed something or have I a problem with chroot?&lt;BR /&gt;&lt;BR /&gt;Hope someone can help,&lt;BR /&gt;&lt;BR /&gt;Tim&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I can ftp send from another server as this user &amp;amp;</description>
      <pubDate>Thu, 07 Oct 2004 11:38:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395623#M199901</guid>
      <dc:creator>Tim O'Connell</dc:creator>
      <dc:date>2004-10-07T11:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Securing ftp access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395624#M199902</link>
      <description>Hi Tim,&lt;BR /&gt;Thought about using chroot (1M)?&lt;BR /&gt;&lt;A href="http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;admit=552267591+1097167757084+28353475&amp;amp;docId=200000063210548" target="_blank"&gt;http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;admit=552267591+1097167757084+28353475&amp;amp;docId=200000063210548&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
      <pubDate>Thu, 07 Oct 2004 11:50:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395624#M199902</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2004-10-07T11:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Securing ftp access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395625#M199903</link>
      <description>I think you have the wrong entry in /etc/ftpd/ftpaccess file.&lt;BR /&gt;&lt;BR /&gt;# vi /etc/ftpd/ftpaccess&lt;BR /&gt;guestgroup &lt;GROUP-NAME-OF-THE-USER&gt;&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;If user you created belongs to group ftpgroup then add the following entry to ftpaccess file&lt;BR /&gt;&lt;BR /&gt;guestgroup ftpgroup&lt;/GROUP-NAME-OF-THE-USER&gt;</description>
      <pubDate>Thu, 07 Oct 2004 12:17:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395625#M199903</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-10-07T12:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Securing ftp access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395626#M199904</link>
      <description>Here are my old notes on this.  I believe that this method may be deprecated, but it works. It restricts a real login to just allow the user to ftp (not telnet) to an HP server.  The user is then restricted to a specific directory.  (This is very similar to setting up anonymous ftp - see the man on ftpd for complete instructions).&lt;BR /&gt;&lt;BR /&gt;1. Create a bogus shell like /usr/bin/ftponly - just put a message in there in case he tries to login on server:  Create a group, like "ftpgroup" and put him in it.  &lt;BR /&gt;&lt;BR /&gt;Example bogus shell:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;/usr/bin/cat &amp;lt;&amp;lt; XX&lt;BR /&gt;***********************************************************************************************&lt;BR /&gt;* ACCESS DENIED: You may use FTP, but you may not login with this account! *&lt;BR /&gt;***********************************************************************************************&lt;BR /&gt;XX&lt;BR /&gt;/usr/bin/sleep 5 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2. Edit (or create) /etc/shells that looks like this (make sure that it includes your bogus shell) :&lt;BR /&gt;&lt;BR /&gt;/usr/bin/sh&lt;BR /&gt;/sbin/sh&lt;BR /&gt;/usr/bin/ksh&lt;BR /&gt;/usr/bin/csh&lt;BR /&gt;/usr/bin/ftponly&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;3. For true "restricted" ftp accounts, Edit user in /etc/passwd with vipw:&lt;BR /&gt;&lt;BR /&gt;(These accounts will not have a regular shell, so they cannot telnet.)&lt;BR /&gt;&lt;BR /&gt;Change the home directory entry to put the "root" level that you want this user to be able see on one side of a period (.)&lt;BR /&gt;The other side of the period is where he intially lands (relative to the new "root") in when he ftps to the server.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;ftpuser:jo/469sTHoYRQ:105:101:ftp account,,,:/opt/apache/ftpdir/./:/usr/bin/ftponly&lt;BR /&gt;&lt;BR /&gt;Do NOT forget the trailing "/" just before the separating "." between the directories above.&lt;BR /&gt;&lt;BR /&gt;4. For "restricted" ftp accounts, you also need to create or edit /ftpd/ftpaccess &lt;BR /&gt;(See ftpaccess manpage for mind-boggling details.)&lt;BR /&gt;&lt;BR /&gt;Example /etc/ftpd/ftpaccess:&lt;BR /&gt;&lt;BR /&gt;class all real,guest *  &lt;BR /&gt;guestgroup www ftpgroup&lt;BR /&gt;upload  *  *  yes  *  *  0775  dirs&lt;BR /&gt;&lt;BR /&gt;My understanding of the above:&lt;BR /&gt;&lt;BR /&gt;# defines a "class" of all, real, and anything starting with guest*&lt;BR /&gt;&lt;BR /&gt;# defines 2 "guestgroup" "groupnames," called "www"  and "ftpgroup"  --- if an ftp user is a REAL /etc/passwd account AND the user belongs to one of these groups, then their ftp session is treated just like anonymous ftp. If a user is in one of these groups they cannot cd to anything outside of their home directory, cannot change user, or password, etc.&lt;BR /&gt;&lt;BR /&gt;# allow "upload" access to any directory, ownership group will be those of the ftp user, directories may be created&lt;BR /&gt;&lt;BR /&gt;When you setup a user like this, the user acts just like an anonymous ftp account.  So, ftpd does a chroot to the selected directory.  However, no files, libraries, etc that are outside this restricted piece of the file system  are available anymore to this user.  So commands like ls won't work anymore.  To just get ls working, you need to create a local usr/bin under the new "root" directory.  Change the permissions on these dirs to 555 - owned by root.  Then copy /sbin/ls into the new usr/bin and  chown to root and chmod 111 on the ls executable.  &lt;BR /&gt;&lt;BR /&gt;5. Put ANY (restricted or not) logins that you do NOT want to ftp in /etc/ftpd/ftpusers.&lt;BR /&gt;&lt;BR /&gt;Hint: use the following command to create the file (NO ONE on this list will be able to ftp):&lt;BR /&gt;&lt;BR /&gt;cat /etc/passwd | awk -F: '{print $1}' &amp;gt; /etc/ftpd/ftpusers&lt;BR /&gt;&lt;BR /&gt;Then remove those users that you DO want to ftp from ftpusers.&lt;BR /&gt;&lt;BR /&gt;6, Setup the ftpd entry in inetd.conf like this:  &lt;BR /&gt;&lt;BR /&gt;ftp          stream tcp nowait root /usr/lbin/ftpd      ftpd -a   &lt;BR /&gt;&lt;BR /&gt;(note: ftpaccess file must exist!)&lt;BR /&gt;&lt;BR /&gt;(The ftpd -a tells the daemon to access the /etc/ftpd/ftpaccess configuration file.)&lt;BR /&gt;&lt;BR /&gt;7. Restart inetd like this inetd -c  (works on hp-ux).</description>
      <pubDate>Thu, 07 Oct 2004 19:39:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395626#M199904</guid>
      <dc:creator>Mike Patterson</dc:creator>
      <dc:date>2004-10-07T19:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Securing ftp access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395627#M199905</link>
      <description>Thanks, Sundar&lt;BR /&gt;&lt;BR /&gt;You hit the nail on the head. I had  put   newgroup ftponly    at the bottom of the ftpaccess file rather than    guestgroup newgroup.&lt;BR /&gt;&lt;BR /&gt;Thanks for the notes, Mike. I will go thru' them &amp;amp; see what I missed.&lt;BR /&gt;&lt;BR /&gt;Points awarded,&lt;BR /&gt;&lt;BR /&gt;Thanks for all replies&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Fri, 08 Oct 2004 03:23:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/securing-ftp-access/m-p/3395627#M199905</guid>
      <dc:creator>Tim O'Connell</dc:creator>
      <dc:date>2004-10-08T03:23:37Z</dc:date>
    </item>
  </channel>
</rss>

