By default, when you deploy an application to Azure App Service plan – your default web location will be under /home/site/wwwroot . /home/ is a persistent storage which means if you restart your application, your data will be still there. The problem with /home folder is that, it’s actually a network folder , which means every time you want to access files on this folder, it will do a network call. Some applications using some framework like Symfony , their library is huge, they read a lot of files , this will cause your application is very slow to respond. How do we fix this?Read More →

We have some accounts such as postfix,apache .. these account has “nologin” shell, meaning you can’t sudo su – apache or “su – apache”. Sometimes we need to login to these account to run some commands to check some permission issues. The solution is: su -s /usr/bin/bash apache (as you can see in the command, we explicitly provide the shell instead of using the system default)Read More →

We have a monitoring system to check network devices, sometimes we got an alert saying the remote device is down. We check the remote device and it’s working fine. To ensure that our monitoring working properly, we create an external script to monitor system, then we want to compare the result between 2 systems. I finally come with this script (ping.sh) , it will continuously ping the remote server, if it’s down, it will write a log. I want to run this script in background so i run it like this: The script is just the basic only, you can do a lot of customizationRead More →

My son was asking me to help him set up a server so that he can play with his friends – and i found this , easy to do. https://www.astralinternet.com/blog/en/build-minecraft-pocket-edition-server-ubuntu/ I turns out that this version does not work well with latest minecraft , i download the version from Minecraft official website, it works pretty well https://www.minecraft.net/en-us/download/server/bedrock/ After you download the server, just run this command:Read More →

If you are running on Linux machine and. every time you access to your corporate website , it asks you for the password , but this does not happen with your Windows machine. I have spent a lot of times to research on this and found that: Chrome supports some of these authentication method: Basic, NTLM , Negotiate with Kerberos and Certificate. In this post, i will share how i pass the NTLM authentication by using a chrome extension. Here are 2 files that i use to create the extension:webrequest.js manifest.jsonRead More →

I have installed mysql many many times – i decided to save a note for myself for later installation. This is to install msyql server on Redhat 7. Below is the step: My next step will go to https://www.phpmyadmin.net/ to download phpmyadmin and set it up on my web server. I use this tool to manage the database. We need to install mysql module:Read More →

I have a folder like this: total 4.0K -rwxrwx—. 1 root vboxsf 101 Dec 25 08:03 notes.txt drwxrwx—. 1 root vboxsf 64 Dec 24 22:43 test drwxrwx—. 1 root vboxsf 64 Dec 25 07:45 test2 Then I run a docker sudo docker run -i -v /Data:/Data ubuntu bash cd /Data mkdir test3 I got permission denied. After some research, it turned out that this related to SELinux, it’s a security feature to limit root access. You can easily identify this by looking at the dot (.) at the end of the listing. You can temporary disable it by using: su -c “setenforce 0” To makeRead More →