snipt

Ctrl+h for KB shortcuts

Bash

get entire folder via sftp

get -r *
https://snipt.net/embed/4181bf84de720b413ee400959a1322d2/
https://snipt.net/raw/4181bf84de720b413ee400959a1322d2/
4181bf84de720b413ee400959a1322d2
bash
Bash
1
2016-09-26T11:49:27
True
False
False
/api/public/snipt/136854/
get-entire-folder-via-sftp-ecec2af5
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>get -r * </span></pre></div> </td></tr></table>
copy, ftp, linux, sftp

Text only

Wordpress FTP base

1
2
3
4
5
6
7
if(is_admin()) {                                                                                                                       
    add_filter('filesystem_method', create_function('$a', 'return "direct";' ));                                                       
    define( 'FS_CHMOD_DIR', 0751 );                                                                                                    
}                                                                                                                                      
                                                                                                                                       
define('FS_METHOD', 'ftpsockets');                                                                                                     
define('FTP_BASE', '/var/www/finida-tar-vabriga.com/web');
https://snipt.net/embed/b268357e9e32293fd922ddf8f204f8ae/
https://snipt.net/raw/b268357e9e32293fd922ddf8f204f8ae/
b268357e9e32293fd922ddf8f204f8ae
text
Text only
7
2016-09-21T16:43:56
True
False
False
Oct 26, 2012 at 05:29 AM
/api/public/snipt/49083/
wordpress-ftp-base
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>if(is_admin()) { </span><span id="L-2"><a name="L-2"></a> add_filter(&#39;filesystem_method&#39;, create_function(&#39;$a&#39;, &#39;return &quot;direct&quot;;&#39; )); </span><span id="L-3"><a name="L-3"></a> define( &#39;FS_CHMOD_DIR&#39;, 0751 ); </span><span id="L-4"><a name="L-4"></a>} </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a>define(&#39;FS_METHOD&#39;, &#39;ftpsockets&#39;); </span><span id="L-7"><a name="L-7"></a>define(&#39;FTP_BASE&#39;, &#39;/var/www/finida-tar-vabriga.com/web&#39;); </span></pre></div> </td></tr></table>
ftp, wordpress

Text only

restrict users in Linux to their home directory

1
2
3
4
# Restrict users in Linux to their home directory
# Edit /etc/vsftpd/vsftpd.conf
chroot_local_user=YES
# Then: service vsftpd restart
https://snipt.net/embed/065cb36facb1158cae2f5eaec671327e/
https://snipt.net/raw/065cb36facb1158cae2f5eaec671327e/
065cb36facb1158cae2f5eaec671327e
text
Text only
4
2016-09-26T17:43:35
True
False
False
/api/public/snipt/27213/
restrict-users-in-linux-to-their-home-directory
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a># Restrict users in Linux to their home directory </span><span id="L-2"><a name="L-2"></a># Edit /etc/vsftpd/vsftpd.conf </span><span id="L-3"><a name="L-3"></a>chroot_local_user=YES </span><span id="L-4"><a name="L-4"></a># Then: service vsftpd restart </span></pre></div> </td></tr></table>
directory, ftp, home, limit, restrict
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.