how to install ftp server in ubuntu 20.04

Here we will install and configure vsftpd (Very Secure File Transfer Protocol Daemon) on Ubuntu.

Install vsftpd

Update the package list and dependencies for vsftpd. Then second command download and Install vsftpd.

$ sudo apt update && sudo apt install vsftpd

Check the status of vsftpd

$ sudo service vsftpd status
● vsftpd.service – vsftpd FTP server Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2020-04-27 19:35:30 IST; 13s ago Main PID: 54532 (vsftpd) Tasks: 1 (limit: 1137) Memory: 652.0K CGroup: /system.slice/vsftpd.service └─54532 /usr/sbin/vsftpd /etc/vsftpd.conf Apr 27 19:35:30 ubuntu systemd[1]: Starting vsftpd FTP server… Apr 27 19:35:30 ubuntu systemd[1]: Started vsftpd FTP server.

Configure Firewall

$ sudo ufw allow OpenSSH
$ sudo ufw allow 20/tcp
$ sudo ufw allow 21/tcp
$ sudo ufw allow 40000:50000/tcp
$ sudo ufw allow 990/tcp
$ sudo ufw enable
$ sudo ufw status
Status: active To Action From — —— —- OpenSSH ALLOW Anywhere Apache Full ALLOW Anywhere 3306 ALLOW Anywhere 20/tcp ALLOW Anywhere 21/tcp ALLOW Anywhere 40000:50000/tcp ALLOW Anywhere 990/tcp ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) Apache Full (v6) ALLOW Anywhere (v6) 3306 (v6) ALLOW Anywhere (v6) 20/tcp (v6) ALLOW Anywhere (v6) 21/tcp (v6) ALLOW Anywhere (v6) 40000:50000/tcp (v6) ALLOW Anywhere (v6) 990/tcp (v6) ALLOW Anywhere (v6)

Create FTP User

$ sudo adduser ftpuser
$ sudo nano /etc/ssh/sshd_config
DenyUsers ftpuser
$ sudo service sshd restart

Directory Permissions

Upload to a Web Server

$ sudo usermod -d /var/www ftpuser
$ sudo chown ftpuser:ftpuser /var/www/html

 Upload to a Home Folder

$ sudo mkdir /home/ftpuser/ftp
$ sudo chown nobody:nogroup /home/ftpuser/ftp
$ sudo chmod a-w /home/ftpuser/ftp
$ sudo mkdir /home/ftpuser/ftp/files
$ sudo chown ftpuser:ftpuser /home/ftpuser/ftp/files

Configure vsftpd

$ sudo mv /etc/vsftpd.conf /etc/vsftpd.conf.bak
$ sudo nano /etc/vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
force_dot_files=YES
pasv_min_port=40000
pasv_max_port=50000
user_sub_token=$USER
local_root=/home/$USER/ftp

We are done with vsftpd.conf

$ sudo systemctl restart vsftpd

Secure FTP with TLS (Recommended)

$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
$ sudo nano /etc/vsftpd.conf
ssl_enable=YES
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
$ sudo systemctl restart vsftpd

Testing TLS with FileZilla

How to create static html page from dynamic php page

  • Opportunity to working on live project
  • Learn Advance topic in low cost
  • Get experience certificate
  • Learn Advance topic in limited time period
  • Get job opportunity
  • Topic cover on fast track
<?php
include ("include/conn.php");
error_reporting(E_ALL);
ini_set('display_errors', '1');
$cmdm="select * from satta_cms";
 $resultm=mysqli_query($link,$cmdm); 
 if($rowm=mysqli_fetch_array($resultm)){ 
	 $srno=$rowm['srno']; 
	 $message1=nl2br($rowm['message1']); 
	 $message2=nl2br($rowm['message2']); 
	 $message3=nl2br($rowm['message3']); } 
date_default_timezone_set('Asia/Kolkata');
$cmd1="select * from record"; $result1=mysqli_query($link,$cmd1);
 while($row1=mysqli_fetch_array($result1)){
	  $recno=$row1['recno'];
	 $tablename=$row1['tablename'];
			
 $cmd="select * from $tablename";
$result=mysqli_query($link,$cmd);
while($row=mysqli_fetch_array($result)){
	$recname=$row['recname'];
	$recdate=$row['recdate'];
	$rec=$row['new'];
	$recdispdate=date('d-M-Y',strtotime($recdate)); 
	ob_start();
?>
 
<!DOCTYPE html>
<html lang="en">
<head>
  <?php include('common/head.php'); ?>
 <style>
 h1.text-center {
    background-color: #000000;
    color: white !important;
    padding: 15px;
    text-align: center;
}
 </style>
  </head>
  <body>
<?php include('common/nav.php'); ?>


<div class="container">
<div class="row">
<?php include('common/advertise1.php'); ?>
<div class="col-lg-12"><h1 class="text-center"><?php echo date('d-M-Y',strtotime($recdate)); ?></h1></div>
<div class="live text-center">
    <h1><img src="satta-king.gif" width="70px"></h1>
 <div id="recbadge"> <h4 id="rectime"><?php echo $rec;?></h4><h2 id="recname" class="text-uppercase"><?php echo $recname;?></div>
 </div>

</div>
<hr>

</div>


<div class="container">
<div class="row">
<div class="col-lg-12">
<?php include('common/advertise0.php'); ?>
<?php include('common/message1.php'); ?>
<?php include('common/message2.php'); ?>
<?php include('common/message3.php'); ?>
    <?php include('common/advertise.php'); ?>
<?php //$cmd="select * from record order by rectime"; include('common/record-display.php');
?>
</div>
</div>
</div>
<?php
include('common/script.php');
 ?>

  </body>
</html>
<?php


$MainDir="satta-king-result";
 if(!is_dir($MainDir))
{
	mkdir($MainDir,0777);
}
$fileName=str_ireplace(' ','-',$recname).'-'.$recdispdate;

//
//$fp=fopen($MainDir.$QuestionId.".html","w");
$fp=fopen($MainDir."/".$fileName.".html","w");
$html = ob_get_contents();
fputs($fp,$html);


  } } ?>

how to change limit value 15 25 in opencart of category page

Change default 15 products per page on Category view

Goto Extensions in Extensions in opencart, Choose the extension type Theme

Click on edit button and change below listed value

For views change value from category.php from controller directory

	$data['limits'] = array();

			$limits = array_unique(array($this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'), 25, 50, 75, 100));

			sort($limits);

BMW R 1250 GS bike

BMW R 1250 GS bike launched at Rs. 20.45 lakh

08 Jul 2021: BMW R 1250 GS bike launched at Rs. 20.45 lakh

BMW Motorrad India has launched the all-new R 1250 GS motorbike in India. It has been priced starting at Rs. 20.45 lakh and is offered in two variants of R 1250 GS Pro and R 1250 GS Adventure Pro. The duo arrives via the Completely Built Up (CBU) route and runs on a BS6-compliant 1,254cc engine linked to a 6-speed gearbox. Here’s our roundup.

Design: The bikes house an all-LED lighting setup

The BMW R 1250 GS Pro and Adventure Pro feature an aggressive design with a sloping fuel tank, an upswept exhaust, and an adjustable transparent windscreen. They also sport a full-LED lighting setup, a TFT color display with support for Bluetooth connectivity, and ride on 19-inch front and 17-inch rear wheels. The vehicles are available in Style Triple Black and Style Rallye color options.

Fact: A 134hp, 1,254cc engine fuels the motorcycles

The BMW R 1250 GS Pro and Adventure Pro draw power from a 1,254cc, air/liquid-cooled, flat-twin engine that is tuned to make 134hp of power at 7,750rpm and 143Nm of peak torque at 6,250rpm. Transmission duties are handled by a 6-speed gearbox.

Safety: Disc brakes are offered for the rider’s safety

The BMW R 1250 GS Pro and Adventure Pro are equipped with disc brakes on both the wheels, along with ABS Pro, traction control and hill start control. They also offer three riding modes: Eco, Road, and Rain. Suspension duties are taken care of by a central spring strut on the front and a single-sided swing arm with BMW Paralever on the rear end.

Fact: BMW R 1250 GS Pro, Adventure Pro: Pricing and availability

The BMW R 1250 GS motorbike carries a price-tag of Rs. 20.45 lakh for the GS Pro model and Rs. 22.40 lakh for the GS Adventure Pro variant (both prices, ex-showroom). A limited-run ’40 Years GS’ edition is also expected to arrive in India.

IPHONE 13, 13 PRO, 13 PRO MAX

IPHONE 13, 13 PRO, 13 PRO MAX, AND 13 MINI WILL BE THE 2021 IPHONE, SAY APPLE SUPPLIERS

In not so surprising news, the 2021 iPhone models will be called the iPhone 13, iPhone 13 Pro, iPhone 13 Pro Max, and iPhone 13 mini. According to Economic Daily News, Apple is going to follow last year’s naming convention to name this year’s iPhone model. This may not seem like a big thing, but it paints a picture of what Apple has planned for this year’s iPhone. iPhone 13 means Apple is not going to stray away from the increasing order of numbers for the iPhone anytime soon.

Economic Daily News has cited supply chains to report that the 2021 iPhone would be called the iPhone 13. The iPhone 13 will succeed over the iPhone 12, the iPhone 13 Pro will take things forward from the iPhone 12 Pro, the iPhone 12 Pro Max will have the iPhone 13 Pro Max as the successor, and the iPhone 13 mini will be the successor to the iPhone 12 mini. The “mini” model is specifically interesting because Apple is moving ahead with it this year despite not having good luck with the sales of the cheapest and smallest iPhone model from last year’s series.

Foxconn (Hon Hai) is going to be a major manufacturer of the iPhone 13 series. In addition to manufacturing the iPhone 13 mini, Foxconn is in the process of fulfilling orders for the iPhone 13, the iPhone 13 Pro, and the iPhone 13 Pro Max. Apple has other manufacturers, as well, for the iPhone 13 series. Pegatron, the Taiwanese manufacturer of the iPhone, is back to business after being put on probation last year for violating Apple’s code of conduct for suppliers by asking students to work overtime and night shifts.

The reason why the name iPhone 13 is a bigger deal than you think is the belief of people in triskaidekaphobia, which is the fear of the number 13. According to Macrumors, a recent survey showed one out of five iPhone and iPad users are not in favour of the iPhone 13 as the name for the next iPhone model. At the same time, 38 per cent of the participants recommended Apple should drop these numbers altogether and go for names that have the corresponding year of launch in them. For example, iPhone 2021 should be the name for this year’s iPhone. It makes sense to go with the easy nomenclature here, but Apple is unlikely to heed this.

Besides iPhone 13, this year’s iPhone may also be known as iPhone 12S, according to previous rumours. That belief stems from the fact that Apple has launched “S” models previously, but that is only to denote smaller upgrades in the iPhone over its previous generation. Notably, Apple did not launch iPhone 11S because last year’s iPhone brought a radical design change. Since this year’s iPhone is likely to undergo incremental upgrades over the iPhone 12, some rumours suggested it will end up being launched as the iPhone 12S. The iPhone this year is likely to have a bigger camera, a 120Hz ProMotion AMOLED display, and a better processor.

[Read More…]

Developer Setup: High Availability & Multiconnect

Developer Setup: High Availability & Multiconnect

This document shows you how to set up a High Availability cluster on a developer machine. It also provides guidance on how to enable Multiconnect on top of that as well as the changes required for a highly available Multiconnect cluster. For a production setup, follow the relevant instructions listed in Production Setups.

Before you start any of these set ups, check our list of requirements.

To set up a High Availability cluster follow these steps:

  1. Create a biz Directory for the setup scripts
  2. Get the WhatsApp Business API Client configuration files
  3. Set the WA_API_VERSION environment variable
  4. Start the WhatsApp Business API Client with High Availability
  5. Verify containers are running
  6. Perform a health check
  7. Register the WhatsApp Business API Client
  8. Perform a second health check

To set up a Multiconnect cluster follow these steps:

  1. Set up two shards
  2. Perform a health check
  3. Start a third coreapp to maintain High Availability
  4. Perform a second health check

Developer Setup: Single Instance

Developer Setup: Single Instance

This document shows you how to set up a single instance of the WhatsApp Business API client on a developer machine for testing purposes. For a production setup, follow the relevant instructions listed in Production Setups.

To initially set up a single instance, check our list of requirements, and follow these steps:

  1. Create a biz directory for the setup scripts
  2. Get the WhatsApp Business API Client configuration files
  3. Set the WA_API_VERSION environment variable
  4. Start the WhatsApp Business API Client
  5. Verify containers are running
  6. Perform a health check
  7. Register the WhatsApp Business API Client
  8. Perform a second health check

WhatsApp Business API Installation for Production setup

Production Setups

Demonstrates how to set up a WhatsApp Business API client in a production environment and covers best practices. Please use this documentation as reference and make necessary changes according to your business needs.

The WhatsApp Business API client can be installed as a developer setup for testing using either Docker Compose or Minikube. You can also use Amazon Web Services (AWS) on production systems. You can migrate from a developer setup to a production setup when ready to send messages to customers.

Make sure you have approval for your business’s phone number and have a certificate before attempting installation.

WhatsApp Business API Installation for Developer setup

Developer Setups

Demonstrates how to set up a WhatsApp Business API client on your developer machine with the purpose of getting familiar with the setup process. This should not be used for a production environment. It is highly recommended that you try out one of the developer setup processes below before attempting a production setup.

The WhatsApp Business API client can be installed as a developer setup for testing using either Docker Compose or Minikube. You can also use Amazon Web Services (AWS) on production systems. You can migrate from a developer setup to a production setup when ready to send messages to customers.

Make sure you have approval for your business’s phone number and have a certificate before attempting installation.