Tag Archives: server

Useful pptpd server – poptop admin command

Here are a few commands useful for pptpd server admin:

Find out who is Online:

last | grep ppp | grep still

Get a list of user’s connection time:

ac -d -p
If you don’t have ac on your server, run:
apt-get install acct

Disconnect a User

  1. find out user’s ip (we know it from “Find out who is Online” part)
  2. use command below to find out process id
    ps -ef | grep | grep pppd
  3. end user’s process
    killĀ <process id>

Further Reading:

pptpd server – poptop document

Enable resume upload for proftpd – Append/Restart not permitted, try again

When doing ftp, you may see this message: Append/Restart not permitted, try again, it is because the ftp server doesn’t allow resume upload.

In the case of proftpd, by default, it doesn’t allow for resumed upload for security reasons, but this is useful in daily scenario especially when the network condition is poor.

To turn on the upload resume feature, open the config file: proftpd.conf, and append the below content at the end. And don’t forget to enter a blank new line at the end of the file, proftpd needs it to tell the end of the file, otherwise it will give you a warning: handling possibly truncated configuration data at line.

<Directory /home/tomatosoft/www/file>
AllowStoreRestart on
<Limit LOGIN>
Order allow,deny
Allow from 192.168.10.2
</Limit>
</Directory>

Note: change the directory entry to your own directory and optionally set the value:

Allow from 192.168.10.2

Webmasters: To have the year name in footer text auto updated

To be a webmaster, when the new year moves on, you don’t want to update the year name in the footer text every time. Especially when it’s a job has to be done every year every site every page.

Luckily here is a piece of code to release you from it, it will updated based on year in the server time:

&copy;<?php echo date("Y"); ?> Tomatosoft, All Rights Reserved.

Also, we have used &copy; instead of Unicode character, it’s a good thing to pick up.