User Tools

Site Tools


servers:vsftpd

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
servers:vsftpd [2022/07/20 09:26] – old revision restored (2022/07/19 04:31) Sean Rhoneservers:vsftpd [2023/09/09 15:55] (current) Sean Rhone
Line 5: Line 5:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[distros:fedora_workstation_gnome|Fedora]] ((notes link to Workstation, but this can be done on Server))+  * [[distros:opensuse_tumbleweed_server|openSUSE Tumbleweed]]
  
 ====== Dependencies ====== ====== Dependencies ======
Line 11: Line 11:
 **** ****
  
-  sudo dnf install 'vsftpd'+  sudo zypper install 'vsftpd'
  
 ====== Firewall ====== ====== Firewall ======
  
-  * See [[distros:opensuse_tumbleweed_server#firewalld|firewalld]] +  * See [[notes:misc_linux#firewalld|firewalld]]
-  * TODO: Update firewall link above to Fedora+
  
-  sudo firewall-cmd --add-service='ftp' --permanent && sudo firewall-cmd --reload+  * 20/tcp 
 +  * 21/tcp 
 +  * PASV: 30000-30100/tcp
  
-====== SELinux ======+<code>sudo firewall-cmd --add-service='vsftpd' --permanent && sudo firewall-cmd --reload</code>
  
-  * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/sect-managing_confined_services-file_transfer_protocol-booleans +===== Custom =====
-  * https://hostodo.com/portal/knowledgebase/25/Setup-vsftp-with-SELinux.html +
- +
-  sudo setsebool -P 'ftpd_full_access' 'on' +
- +
-  sudo setsebool -P 'ftpd_use_passive_mode' 'on' +
- +
-===== Verify =====+
  
 **** ****
  
-  getsebool -a | grep 'ftp'+<code>sudo firewall-cmd --add-port='20/tcp--permanent && sudo firewall-cmd --add-port='21/tcp' --permanent && sudo firewall-cmd --add-port='30000-30100/tcp' --permanent && sudo firewall-cmd --reload</code>
  
 ====== Service ====== ====== Service ======
Line 45: Line 39:
 ===== General ===== ===== General =====
  
-  * For ''local_root'', even though ''nas1'' is used more frequently, Kodi clients are configured to start from the actual ftp root in order to go into the ''nas2'' folder for media +  sudo -e '/etc/vsftpd.conf&& sudo systemctl restart 'vsftpd'
-  * To make ''nas1'' convenient, set the root folder from FileZilla+
  
-  sudo -e '/etc/vsftpd/vsftpd.conf' && sudo systemctl restart 'vsftpd'+<code> 
 +write_enable=YES</code>
  
 <code> <code>
 # Custom # Custom
-local_root=/var/ftp+pasv_enable=YES 
 +local_root=/srv/ftp
 force_dot_files=YES</code> force_dot_files=YES</code>
  
Line 103: Line 98:
   * :!: This expects 1 drive each with a XFS partition   * :!: This expects 1 drive each with a XFS partition
  
-  sudo mkdir -p '/var/ftp/nas1' '/var/ftp/nas2' && sudo -e '/etc/fstab'+  sudo mkdir -p '/srv/ftp/nas1' '/srv/ftp/nas2' '/srv/ftp/internal' && sudo -e '/etc/fstab'
  
 <code> <code>
 # NAS # NAS
-PARTUUID=x /var/ftp/nas1 xfs defaults 0 2 +PARTUUID=x /srv/ftp/nas1 xfs defaults 0 2 
-PARTUUID=x /var/ftp/nas2 xfs defaults 0 2</code>+PARTUUID=x /srv/ftp/nas2 xfs defaults 0 2</code>
  
-  sudo mount --all+  sudo systemctl daemon-reload && sudo mount --all && sync 
 + 
 +===== Safe Unmount Externals ===== 
 + 
 +  * :!: TODO: See if there's another command that has less dependencies than ''udisks2'' on openSUSE TW 
 + 
 +  sudo udisksctl unmount --force --block-device='/dev/sdb' 
 + 
 +  sudo udisksctl power-off --block-device='/dev/sdb'
  
 ====== Permissions ====== ====== Permissions ======
Line 116: Line 119:
 ===== chown ===== ===== chown =====
  
-  sudo chown --recursive 'espionage724':'espionage724' '/var/ftp/nas1' && sync+  sudo chown --recursive 'espionage724':'espionage724' '/srv/ftp/nas1' && sync
  
-  sudo chown --recursive 'espionage724':'espionage724' '/var/ftp/nas2' && sync+  sudo chown --recursive 'espionage724':'espionage724' '/srv/ftp/nas2' && sync 
 + 
 +  sudo chown --recursive 'espionage724':'espionage724' '/srv/ftp/internal' && sync
  
 ===== chmod ===== ===== chmod =====
  
-  sudo chmod --recursive '774' '/var/ftp/nas1' && sync+  * :!: ''664'' makes sense here, but FileZilla is unable to traverse directories. TODO: Figure this out 
 + 
 +  sudo chmod --recursive '774' '/srv/ftp/nas1' && sync
  
-  sudo chmod --recursive '774' '/var/ftp/nas2' && sync+  sudo chmod --recursive '774' '/srv/ftp/nas2' && sync
  
-===== SELinux =====+  sudo chmod --recursive '774' '/srv/ftp/internal' && sync
  
-  sudo restorecon -F -I -R '/var/ftp/nas1' && sync+====== IPTV ======
  
-  sudo restorecon -F -I -R '/var/ftp/nas2' && sync+  * See [[notes:iptv]]
  
/var/www/wiki/data/attic/servers/vsftpd.1658323601.txt.gz · Last modified: 2022/07/20 09:26 by Sean Rhone