<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Peter's Blog - Nodes for vsftpd</title>
    <link>http://www.petersblog.org/</link>
    <description>Nodes containing the tag vsftpd</description>
    <item>
      <title>vsftpd</title>
      <link>http://www.petersblog.org/node/view/1579</link>
      <description>&lt;p&gt;
I had a need to put an ftp server on my &lt;a href="/tag/slicehost"&gt;slicehost&lt;/a&gt; slice so someone could upload stuff to a site I was hosting. I'd rather avoid ftp as a potential security hole but the alternative is to try to convert them to sftp and also the &lt;a href="/node/1576"&gt;E editor&lt;/a&gt; only supports ftp. 
&lt;/p&gt;
&lt;p&gt;
I settled for vsftpd as the ftp server but it took ages to get this person's login to work. I had him set up chrooted to the directory he needed to be in and with his shell set to /bin/false to prevent him logging into a shell. When testing I couldn't log in as him without getting a generic error 530, login denied according to the log file (which didn't feel the need to say &lt;i&gt;why&lt;/i&gt; login was denied). Of course my own login was fine. 
&lt;/p&gt;
&lt;p&gt;
The answer was in the vsftpd faq, it seems that vsftpd looks through a file called /etc/shells to see if the person connecting has a legitimate login shell and /bin/false wasn't in there. It says this check can be disabled but the incantation didn't work so I had to add /bin/false to the shells file. 
&lt;/p&gt;
&lt;p&gt;
I don't quite understand the logic of this design. Isn't it fairly standard to have users who can ftp in but not login? The /bin/false trick was following a precedent from the noble ubuntu/debian distributions. 
&lt;/p&gt;
&lt;p&gt;
I'm getting into the habit now of adding any file I edit in /etc to subversion (as noted &lt;a href="/node/1559"&gt;here&lt;/a&gt;), if only as a way to keep track of which ones I have fiddled with. The 95% that I don't need to touch are not in subversion. I like this, I can recall what I did and why (through subversion comments) which will help me restore the system or replicate it. That way, next time I need to install vsftpd I can recall what other obscure system files need tweeking. 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/ftp"&gt;ftp&lt;/a&gt; &lt;a href="/tag/linux"&gt;linux&lt;/a&gt; &lt;a href="/tag/subversion"&gt;subversion&lt;/a&gt; &lt;a href="/tag/vsftpd"&gt;vsftpd&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/1579</guid>
      <category domain="http://www.technorati.com/tag">ftp</category>
      <category domain="http://www.technorati.com/tag">linux</category>
      <category domain="http://www.technorati.com/tag">subversion</category>
      <category domain="http://www.technorati.com/tag">vsftpd</category>
    </item>
  </channel>
</rss>
