Ubuntu 18.04 LAMP Server – Quick Setup and FTP to Webserver

I recently setup an Ubuntu 18.04 webserver to test webpages locally. I used tasksel to quickly install the LAMP server role as follows:

sudo apt update
sudo apt install tasksel
sudo tasksel install lamp-server

With the webserver up and running I needed to be able to FTP into the var/www/html directories to upload my HTML and CSS.

As Ubuntu server comes with SSH installed be default I decided to use that for FTP instead of installing something like vsftd (Very Secure FTP Daemon). FTP over SSH turned out to be a much simpler and quicker setup.

Warning: These steps do not restrict access to folders outside of the /var/www/html directories. As such this setup is not recommended for any kind of production server.

First create a new directory under /var/www/html:

cd /var/www/html
sudo mk dir newdirectory

Create a new user and give the user a password:

sudo adduser ftpuser
sudo passwd ftpuser

Finally give the new user the permissions that they need. Change the directory ownership and group:

sudo chown www-data:www-data /var/www/html/newdirectory

Give the group write permissions to the directory:

sudo chmod -R 775 /var/www/html/newdirectory

Add the new user to the www-data group:

sudo usermod -a -G www-data ftpuser

With this done I configured FileZilla to establish a secure FTP connection to my webserver.

Filezilla: Secure FTP using SSH File Transfer Protocol.

Sources:

https://www.digitalocean.com/community/questions/permissions-on-var-www-html-for-uploading-web-site-files-via-sftp

XBox 360 Rock Band 3 Delete Song Cache

This is a quick note to remind me where the song cache for Rock Band 3 is located on my Xbox, should I ever need to delete it again.

Goto Settings, System and then Storage. Select Memory Unit, Games and Apps and then Rock Band 3. Select the Rock Band 3 Song Cache and then choose Delete.

Note: Some other settings may also be lost (scores).

I used this to troubleshoot a custom song issue where a group of songs packaged with C3 Con Tools Video Preparer would not overwrite with newly packaged songs.

Note to self: Video Preparer is only for songs with stems!

Update: It turns out that I did not need to delete my song cache. Rather, I should have updated the file name and song ID of new versions of the songs before loading them onto the Xbox.

LG G6 – Andriod 7.0 – Battery Draining Quickly

Android-logo

I’ve recently noticed that my battery has been draining quite significantly over-night on my LG G6.

I typically have the phone connected to 4G and wireless with Bluetooth turned off. I haven’t installed many apps lately, in fact I have un-installed apps that I have not been using. A quick check of my battery usage did not provide any helpful indication as to why the battery would be draining quickly either.

The only solution that I could find that simply did not involve turning other features off (LTE, location, Bluetooth, Wifi, Background sync etc) was as follows:

  • Go to Settings, Storage, and then Internal Storage
  • Wait for everything to populate and then tap Cached data.
  • When prompted to Clear cache for all apps? tap Clear.
  • Power off and restart your phone.

 

This seems to have dome the trick for me so far …

Windows 10 – Windows Spotlight Not Changing Picture

lock-screen-windows-spotlight

Today I tried a handful of workarounds to try and get Windows Spotlight to change the lock screen images on one of our PCs. There are several solutions posted around the internet and this is the one that worked for me.

First open the Settings app, and then go to Personalization and then Lock Screen.

Change the Background from Windows Spotlight to either Picture or Slideshow:

Lock-Screen-Settings

Close the Settings app and open File Explorer. Browse to the following location (where yourusername is the username of the account you are logged in with):

C:\Users\yourusername\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\Settings

You should see the files roaming.lock and settings.dat. Change their file extensions to .bak to change them to backup files.

Reboot your computer.

Open the Settings app again and under Lock Screen change the background option back to Windows Spotlight.

At this point I could see in the preview that the Windows Spotlight picture had changed and I didn’t have to do anything else.

 

 

Installing LibreELEC Kodi in a VMware vSphere Virtual Machine

LibreELEC banner

I tried a couple of methods of installing LibreELEC in a VMware virtual machine before finding the solution. The first was to simply pass through a Jump drive with a bootable image to the virtual machine. This didn’t work as I discovered that vSphere virtual machines cannot boot from USB.

I also tried converting an image file to an .iso and booting from that – that also didn’t work.

I finally discovered the LibreELEC virtual appliance and simply deployed that to vSphere.

I would typically just post a link, but it appears that the LibreELEC mirrors seem to change so it is best to know how to get a link to the .ova file.

First head to the LibreELEC download page. What we are looking for is a link named info behind which is a mirror list.

libreelec mirror list
(info) link to LibreELEC mirror list.

On the mirror list page you can see that I have two mirrors available in the US:

LibreELEC Mirrors 2
LibreELEC mirrors with path to URL highlighted.

Notice that I have the first portion of the path to a LibreELEC image selected. This URL takes me to the full listing of available LibreELEC images on that mirror.

libreELEC ova
Mirror link to LibreELEC .ova highlighted.

Copy the link to the LibreELEC .ova file and then run the vSphere Client to start deploying the virtual appliance.

Click the File menu and then Deploy OVF Template.

Paste the LibreELEC .ova hyperlink and then click Next to continue through the rest of the deployment wizard.

virtual LibreELEC
LibreELEC installed in VMware vSphere 5.5.

Recursive Find and Replace using Git Bash on Windows 10

In my previous post I setup virtual TV Shows in Kodi for a couple of YouTube channels that I downloaded videos from.

I copy and pasted a template file to create multiple .nfo files,  but I made a mistake – all of the files have 2019 in one of the text fields instead of 2018!

Fortunately I found a nice quick solution that used Git Bash on Windows 10.

I simply mapped my file share as network drive Y, opened Git Bash,  and issued a couple of commands:

$ cd Y:
$ find . -type f -name "*.nfo" -exec sed -i'' -e 's/2019/2018/g' {} +

Done!

A quick run-down of the commands:

  • change directory to Y: (cd Y:)
  • find
  • file (-type f)
  • named *.nfo
  • run sed (-exec sed)
  • edit in-place (-i)
  • add script (-e ‘)
  • substitute 2019 (s/2019)
  • for 2018 globally (2018/g)

Very nice to be able to use bash inside Windows 10!