<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://piszczynski.com/index.php?action=history&amp;feed=atom&amp;title=Sftp</id>
	<title>Sftp - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://piszczynski.com/index.php?action=history&amp;feed=atom&amp;title=Sftp"/>
	<link rel="alternate" type="text/html" href="http://piszczynski.com/index.php?title=Sftp&amp;action=history"/>
	<updated>2026-10-27T15:14:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>http://piszczynski.com/index.php?title=Sftp&amp;diff=1136&amp;oldid=prev</id>
		<title>Aleks: Created page with &quot; == syntaxConfigure SFTP server on Linux == create directory for the sftp data and set permissions:&lt;syntaxhighlight lang=&quot;bash&quot;&gt; sudo mkdir -p /mnt/sftpData sudo chown root:root /mnt/sftpData sudo chmod 755 /mnt/sftpData &lt;/syntaxhighlight&gt;Create a group to manage SFTP users&lt;syntaxhighlight lang=&quot;bash&quot;&gt; sudo groupadd sftpusers &lt;/syntaxhighlight&gt;Create a subdirectory for the user in /mnt/sftpData and set ownership:&lt;syntaxhighlight lang=&quot;bash&quot;&gt; sudo mkdir /mnt/sftpData/sftp...&quot;</title>
		<link rel="alternate" type="text/html" href="http://piszczynski.com/index.php?title=Sftp&amp;diff=1136&amp;oldid=prev"/>
		<updated>2025-06-20T15:59:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == syntaxConfigure SFTP server on Linux == create directory for the sftp data and set permissions:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; sudo mkdir -p /mnt/sftpData sudo chown root:root /mnt/sftpData sudo chmod 755 /mnt/sftpData &amp;lt;/syntaxhighlight&amp;gt;Create a group to manage SFTP users&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; sudo groupadd sftpusers &amp;lt;/syntaxhighlight&amp;gt;Create a subdirectory for the user in /mnt/sftpData and set ownership:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; sudo mkdir /mnt/sftpData/sftp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== syntaxConfigure SFTP server on Linux ==&lt;br /&gt;
create directory for the sftp data and set permissions:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /mnt/sftpData&lt;br /&gt;
sudo chown root:root /mnt/sftpData&lt;br /&gt;
sudo chmod 755 /mnt/sftpData&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Create a group to manage SFTP users&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo groupadd sftpusers&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Create a subdirectory for the user in /mnt/sftpData and set ownership:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /mnt/sftpData/sftpuser&lt;br /&gt;
sudo chown sftpuser:sftpusers /mnt/sftpData/sftpuser&lt;br /&gt;
sudo chmod 750 /mnt/sftpData/sftpuser&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Edit the SSH configuration file to set up SFTP with chroot jail:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
#Add into the bottom of the file:&lt;br /&gt;
&lt;br /&gt;
Match user sftpuser&lt;br /&gt;
    ChrootDirectory /mnt/sftpData&lt;br /&gt;
    ForceCommand internal-sftp&lt;br /&gt;
    AllowTcpForwarding no&lt;br /&gt;
    X11Forwarding no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;restart sshd and ssh services:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl restart sshd&lt;br /&gt;
sudo systemctl restart ssh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aleks</name></author>
	</entry>
</feed>