User Tools

Site Tools


ftp-install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ftp-install [2020/12/02 09:15] gwsadminftp-install [2023/05/17 22:52] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
 <code language-bash> <code language-bash>
-'sudo apt update && sudo apt install vsftpd+sudo apt update && sudo apt install vsftpd
  
  
Line 82: Line 82:
   * Paste in the following   * Paste in the following
  
-<code pre-only+<code bash
-'listen=NO+listen=NO
 listen_ipv6=YES listen_ipv6=YES
 anonymous_enable=NO anonymous_enable=NO
Line 99: Line 99:
 pasv_min_port=40000 pasv_min_port=40000
 pasv_max_port=50000 pasv_max_port=50000
 +allow_writeable_chroot=YES
  
 </code> </code>
Line 120: Line 120:
 <code bash> <code bash>
 sudo groupadd www-pub sudo groupadd www-pub
 +
  
 </code> </code>
 +
   * Add FTP user AND www-data to the group   * Add FTP user AND www-data to the group
  
Line 128: Line 130:
  
 usermod -a -G www-pub www-data usermod -a -G www-pub www-data
 +
  
 </code> </code>
 +
   * Check that the users are part of all groups   * Check that the users are part of all groups
  
Line 136: Line 140:
  
 sudo groups www-data sudo groups www-data
 +
  
 </code> </code>
 +
   * Change ownership of everything under the web directory   * Change ownership of everything under the web directory
  
 <code bash> <code bash>
 sudo chown -R root:www-pub /where/your/web/directory/is sudo chown -R root:www-pub /where/your/web/directory/is
 +
  
 </code> </code>
 +
   * Then change the permissions (or certain web sites won't work - such as NextCloud or WHMCS)   * Then change the permissions (or certain web sites won't work - such as NextCloud or WHMCS)
  
 <code bash> <code bash>
 sudo chmod 2775 /where/your/web/directory/is sudo chmod 2775 /where/your/web/directory/is
 +
  
 </code> </code>
 +
   * In detail, this is what each number is doing://2=set group id, 7=rwx for owner (root), 7=rwx for group (www-pub), 5=rx for world (including nginx www-data user)//   * In detail, this is what each number is doing://2=set group id, 7=rwx for owner (root), 7=rwx for group (www-pub), 5=rx for world (including nginx www-data user)//
  
ftp-install.1606900520.txt.gz · Last modified: 2023/05/17 22:52 (external edit)