Actually there is no way to use symbolic links in FTP. A workaround is to mount the folder with the bind option. For example, i have a jailed FTP account and i want to allow it to access the /tmp/eureka folder.
1. Create the mount point folder in the user home directory.
2. Mount the /tmp/eureka folder with the bind option.
mount --bind /tmp/eureka /home/<username>/eureka
Reference: vsFTPd and Symbolic Links
1. Edit /etc/vsftpd.conf as follow.
2. Create the /etc/vsftpd.chroot_list and enter the usernames which you want to jail.
This is an example shell script which creates a file with datetime as filename.
echo "Eureka!" > eureka.$(date '+%Y-%m-%d').txt
The file is created.
Reference: StackOverflow – linux redirector to log filename with $date variable
We can find the memory usage on a Ubuntu server using the following command
To check your file encoding/charset. Use the following command.
file --mime-encoding <filename>
Previously i have setup a server with Nginx and MariaDB.
Run Drupal 7 in Nginx
But there is one problem in this setup. I cannot restart the MariaDB service. Whenever it is down, i have to restart the server instance.
At first, i thought the failure is caused by the modification of the /etc/mysql/my.cnf. So i try to restore the original my.cnf. The following solution helps you to restore the default package configuration file.
Haven’t worked with CentOS for a long time. Miss the time and the teammates in HKU CECID.
Here are the steps to install Alternative PHP Cache (APC) on CentOS.
1. Install the following packages.
yum install php-pear php-devel httpd-devel pcre-devel gcc make
In Drupal, we can use a progress bar when uploading an image or file. But that needs a PHP PECL extension called uploadprogress. The following steps work for Ubuntu Precise (Ubuntu 12.04.1 LTS).
1. Install the php5-dev package.
We can install package easily in Ubuntu by the apt-get command. But sometimes we may want to find out what packages are available in the repositories as well as the package version.
To search a package, use the apt-cache search <name> command.
For example, apt-cache search nginx
Each Linux user may want to have timezone different from the server. In Ubuntu, you can set it using the tzselect command.
1. Run the tzselect command and select the continent or ocean.