<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=3718&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / vsftpd TLS/SSL/FTPS]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=3718</link>
		<description><![CDATA[The most recent posts in vsftpd TLS/SSL/FTPS.]]></description>
		<lastBuildDate>Mon, 03 Aug 2020 16:33:02 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: vsftpd TLS/SSL/FTPS]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=23824#p23824</link>
			<description><![CDATA[<p>Not sure why anyone would fool around with TLS/SSL/FTPS vsptd when you can accomplish the same thing, only better with sftp whcih is enabled in most sshd servers.</p><p>Filezilla supports sftp and if the user is using Linux, the user can simply put an sftp&#160; URL in their File Manager window</p><p>Example: <span class="bbc">sftp://share@my-public-ssh-server.org/</span></p><p> and access your ssh/sftp server graphically through their file manager.</p><p>I have some friends with whom I share data. They are not malicious but are not tech savvy and could accidentally create havoc. I wanted to restrict them to a <span class="bbc">share</span> home directory for downloads while only allowing uploads in one sub-directory called <span class="bbc">upload</span> - similar to an anonymous ftp server.</p><p>Create a user called <strong>share</strong> with <span class="bbc">adduser</span> as root.</p><p>Change the <strong>share</strong> user <strong>/etc/passwd</strong> entry to look, something like the below.</p><div class="codebox"><pre><code>share:x:1010:1010:Share,,,:/home/share:/usr/sbin/nologin</code></pre></div><p><span class="bbc">/usr/sbin/nologin</span> will only allow sftp logins and disallow ssh logins - files can be transferred but the user can never get a shell. This also restricts sftp to directory <span class="bbc">/home/share</span> and its subdirectories.</p><p>Make sure that there <span class="bbc">/etc/group</span> entry something like</p><div class="codebox"><pre><code>share:x:1010:</code></pre></div><p>As root. issue the following command.</p><div class="codebox"><pre><code>mkdir -p /home/share/dev/</code></pre></div><div class="codebox"><pre><code>cd /home/share/dev/</code></pre></div><div class="codebox"><pre><code>mknod -m 666 null c 1 3</code></pre></div><div class="codebox"><pre><code>mknod -m 666 tty c 5 0</code></pre></div><div class="codebox"><pre><code>mknod -m 666 zero c 1 5</code></pre></div><div class="codebox"><pre><code>mknod -m 666 random c 1 8</code></pre></div><p>Make sure that <span class="bbc">/home/share</span> is owned by <span class="bbc">root</span> in order to ensure that users can only download and not upload or delete files except in the <span class="bbc">upload</span> sub-directory. </p><p>In the end, you should have something that looks like the below.</p><div class="codebox"><pre><code>drwxr-xr-x 5 root root 4096 Jan 24 16:02 /home/share
drwxr-xr-x 2 root  root    4096 Apr 29 00:52 /home/share/dev
drwxr-xr-x 2 share share  12288 Jan 29 21:44 /home/share/upload
crw-rw-rw- 1 root root 1, 3 Jan 29 00:52 /home/share/dev/null
crw-rw-rw- 1 root root 1, 8 Jan 29 00:52 /home/share/dev/random
crw-rw-rw- 1 root root 5, 0 Jan 29 00:52 /home/share/dev/tty
crw-rw-rw- 1 root root 1, 5 Jan 29 00:52 /home/share/dev/zero</code></pre></div><p>The above are modified instructions from <a href="https://www.tecmint.com/restrict-ssh-user-to-directory-using-chrooted-jail/" rel="nofollow">here</a></p><p>I also have an anonymous ftp server. Good instructions are <a href="https://serverfault.com/questions/247096/allow-anonymous-upload-for-vsftpd" rel="nofollow">here</a>. Note that transferring files via FTP is extremely secure if every file is encrypted. But when you get tired of encrypting every file, SFTP is the best choice.</p>]]></description>
			<author><![CDATA[dummy@example.com (Vernon)]]></author>
			<pubDate>Mon, 03 Aug 2020 16:33:02 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=23824#p23824</guid>
		</item>
		<item>
			<title><![CDATA[vsftpd TLS/SSL/FTPS]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=23819#p23819</link>
			<description><![CDATA[<p>Re: <a href="https://help.ubuntu.com/community/vsftpd#TLS.2FSSL.2FFTPS" rel="nofollow">https://help.ubuntu.com/community/vsftp … SSL.2FFTPS</a></p><div class="quotebox"><blockquote><div><p>No need to create a certificate if openssl package is installed!</p></div></blockquote></div><p>Is this true?</p>]]></description>
			<author><![CDATA[dummy@example.com (Devuman)]]></author>
			<pubDate>Mon, 03 Aug 2020 13:11:42 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=23819#p23819</guid>
		</item>
	</channel>
</rss>
