-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ ec3c1be 🚀
- Loading branch information
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1726,10 +1726,26 @@ | |
<h1 id="producers-sftp">Producers SFTP<a class="headerlink" href="#producers-sftp" title="Permanent link">#</a></h1> | ||
<p>We have a producer SFTP which is part of the producer platform.</p> | ||
<p>This sftp is used by producers who send files for regular automated updates of their products.</p> | ||
<p>The sftp is located on off1.openfoodfacts.org</p> | ||
<p>The <code>/home/sftp</code> folder links to <code>/srv/sftp/</code> and contains home for sftp users.</p> | ||
<p>The sftp is located on the reverse proxy container (because it needs it's own network interface).</p> | ||
<p>The sftp directory is a ZFS dataset in <code>zfs-hdd/off-pro/sftp</code>. | ||
It is mounted as <code>/mnt/off-pro/sftp</code>:</p> | ||
<ul> | ||
<li>in the reverse proxy to give access to producers themselves (through sftp)</li> | ||
<li>and in off-pro container to give access to files to the producers platform.</li> | ||
</ul> | ||
<p>In the reverse proxy container, the sftp is configured in /etc/ssh/sshd_config.d/sftp.conf which is a symlink to <code>confs/proxy-off/sshd_config/sftp.conf</code> in this repository.</p> | ||
<p>If a producer want's to connect with a key, put the public key in a file named <code>/mnt/off-pro/sftp/<username>_authorized_keys</code>.</p> | ||
<h2 id="adding-a-new-sftp-user">Adding a new sftp user<a class="headerlink" href="#adding-a-new-sftp-user" title="Permanent link">#</a></h2> | ||
<p>Use the script <a href="../scripts/off1/add_sftp_user.pl"><code>add_sftp_user.pl</code></a> (present in <code>/home/script</code>) with user root.</p> | ||
<p>Use the script <a href="../scripts/off1/add_sftp_user.pl"><code>add_sftp_user.pl</code></a> (present in <code>script/off-proxy</code>) with user root in the reverse proxy container.</p> | ||
<p><strong>:fire: IMPORTANT :fire::</strong> every user <strong>must be in <code>sftponly</code> group</strong> and only in this one.</p> | ||
<p>You may eventually communicate the server key fingerprint to the producer | ||
(get it with <code>ssh-keyscan $(hostname) | ssh-keygen -lf -</code>)</p> | ||
<p>It's better to test access before sending the mail to the producer:</p> | ||
<div class="highlight"><pre><span></span><code>lftp<span class="w"> </span>sftp://[email protected] | ||
password: | ||
><span class="w"> </span>ls | ||
</code></pre></div> | ||
<p>(issue at least an <code>ls</code> because <code>lftp</code> only try to connect at the first command)</p> | ||
|
||
|
||
|
||
|
Binary file not shown.