Happy Holidays Everyone!

A Christmas orniment hanging on a Christmas Tree with Happy Holidays written in front of it.

I just wanted to wish everyone out there in this increasing crazy world out there. I have not felt much like celebrating the holidays since I lost my Wife three years ago but this years has me feeling much more into the spirit of things. With that being said I hope that you and yours have the happiest of holidays! 😀

How to clone permission of a directory of file onto another file or directory in Linux

In my day job I recently came across a much easier was to deal with file and/or directory permissions on Linux based systems. Typically, to determine the permissions of a file or directory you would use the ls command with various potions appended to the end of the command and to change the same file or directory’s permissions you would use the chmod command. As I recently discovered the chmod is also able to clone or copy permissions as well as manually set them.

To lustrate what I ma talking about let’s create a hypothetically example where we have two files with the following permissions.

$ ls -l file*
-rwxr-xr--. 1 lrendek lrendek 0 Apr  7 14:39 file1
-rw-rw-r--. 1 lrendek lrendek 0 Apr  7 14:40 file2

If we wanted to copy the permissions from file 1 onto file2 we would run the following option appended to the chmod command.

$ chmod --reference=file1 file2

As we can see the permissions for file2 have been cloned from file1.

$ ls -l file*
-rwxr-xr--. 1 lrendek lrendek 0 Apr  7 14:39 file1
-rwxr-xr--. 1 lrendek lrendek 0 Apr  7 14:40 file2

If we extend this example further we can also clone the permissions of a directory as well!

$ ls -ld dir*
d--x--x--x. 2 lrendek lrendek 40 Apr  7 14:52 dir1
drwxrwxr-x. 2 lrendek lrendek 40 Apr  7 14:52 dir2
$ chmod --reference=dir1 dir2
$ ls -ld dir*
d--x--x--x. 2 lrendek lrendek 40 Apr  7 14:52 dir1
d--x--x--x. 2 lrendek lrendek 40 Apr  7 14:52 dir2

I had a little bit of an issue finding this but stubbled across this site that provided me with the syntax and examples. Although, I am making this entry mainly for myself but I also hoping that this post will make another Sys. Admin. Job easier. Uf you have any questions, comments, etc. please feel free to contact me on my Contact page or on Twitter.

Run Neofetch on every terminal window on macOS

Neofetch is really neat open source tool for displaying your system information on your command line oof choice. There are a lot of instructions on the Internet explaining how to do this on most Linux based system. There is a lot less information for Unix like systems such as macOS. Currently, I am running macOS Montery and as this version of the operating system now uses ZSH over the traditional Bash shell for the Terminal app . Eventually, I figured out that this difference in default shells is why I could not get this to work. If you want to do this for yourself you will need to first install the application.

Now, unlike installing most applications on macOS there is no graphical installer so instead we have to use the fantastic macOS package manager Homebrew. in order to do this open up Terminal and run this command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Once this is complete and you run this command:

brew install neofetch

Once neoffetch has been installed running it is super easy, just do:

neofetch

Great, now that we have neofetch installed, if you want to run this. every time a Terminal window opens we need to create a .zshrc file in your home directory which will run the neofetch command every time you open a new Terminal window.

 sudo nano .zshrc

then you just add the command into this new blank file

Don’t forget to do ctrl+x to save the file. 🙂

If all went well you should see something similar to this once you quit and open Terminal.

If you have any issues or questions feel free to DM me on Twitter or use the contact form on this site.

Useful Linux CLI commands

Some of these are pretty basic and some are a bit more advanced and/or obscure in my opinion. I hope they are also useful to others out there. Please not that files names and file paths are just made up examples and might not fit what you are attempting to accomplish.

  • cd – change directory
  • Carl + c – cancels the currently running foreground operation
  • pod – s/how your current fill file path
  • cp /path/to/file.txt /path/to/your/new/file.txt – copy a file from one location to another location
  • move (rename) a file from one location to another location – mv file1.txt file1.back.txt
  • show the tail end of a file with any new additions that are written to the file – tail -f /var/log/messages.log
  • determine if a node is online – ping duck.com
  • determine the network route to a given node – trace route duck.com
  • perform a DNS lookup on a given address – nslookup duck.com
  •  show xx number of lines at the tail end of a file – Show the tail end of a file with any additions – tail -f /var/log/messages
  • run a shell script – bash shellscript.sh OR sh shellscript.sh
  • check drive mappings for the currently mounted file system – do -h
  • change to another system user – su username
  • easy way to change to the root user if you have sudo level access – sudo -i

How to Find Out What Version of Linux You Are Running

---------- On Red Hat Linux ---------- 
$ cat /etc/redhat-release

---------- On CentOS Linux ---------- 
$ cat /etc/centos-release

---------- On Fedora Linux ---------- 
$ cat /etc/fedora-release

---------- On Debian Linux ---------- 
$ cat /etc/debian_version

---------- On Ubuntu and Linux Mint ---------- 
$ cat /etc/lsb-release

---------- On Gentoo Linux ---------- 
$ cat /etc/gentoo-release

---------- On SuSE Linux ---------- 
$ cat /etc/SuSE-release

AS you can see this various depending on on which form of the original Linux Operating System so I usually end up searching for this as it is not something that I use day to day in my professional or work life. I hope it makes somees’s day that much easier. 🙂

Increase the Docker image size for UNRAID

I keep having to look this up so I might as well save myself some time. 😉

  • From the UNRAID Web UI stop the RAID array under Main > Array Options > Stop Array.
  • When the UI reloaded go to Settings > Docker.
    • You should now be able to change the size of the array in GB.
  • Click the Save button.
  • Start the RAID array back up.

Weird Amazon Digital Charges (AMZN Digital*MI)

For awhile now I have been seeing a reoccurring charge for $5.99 listed as AMZN Digital*MI or something similar. I looked all over my account pages and could never find any subscriptions that were active. I was finally able to determine that the charge was for ComiXology which was squired by Amazon some time ago. I am assuming at some point the charge stopped being listed under ComiXology and was switched to Amazon Digital but I am not certain about this. There was no help for this online so I thought I would put a not here and hope that future searchers find this post.

Upgrading my home’s WiFi

This month my home experienced a rare power outage.  It did not last very long but somehow during the outage my trusty ASUS router was powering up but it was not passing any traffic.  I tried various troubleshooting methods but nothing resurrected it.  So, now I am forced to use the WiFi function of my DSL Gateway.  This system is really great for range but terrible for speed and reliability,  My household suffers through this for a few days before we decided that now we are in the market for a new router so after doing some research at The Wirecutter to see what they recommend as they have a really good testing methodologies.

 

The clear winner was of course the Eero Mesh WiFi System.  So my Wife and I made a trip to our local Best Buy to pick up the system that works best for the layout of our ranch style home.  Before installing the new system I ran a few speed tests from my office on a desktop and in carious places through the house on my smart phone.  The results are as follows.

Speed tests from DSL Gateway.

Mobil test from the kitchen.
Mobile test from the living room.
Mobile test from the bedroom.
Mobile test from the office.

As you can see the signal strength is good but the speeds are terrible.  We were fin unless someone wanted to stream a video and we were buffering very often.

The setup process.

Setting up the Eero Gateway was very easy.  Unbox the gatewayy, install the eero application from your mobile app store of choice, and follow the prompts.

For my home I have the following setup.

  • 1x Eero Gateway in the Living Room
    • 1x Belkin undamaged switch
  • 1x Eero Beacon in the Kitchen
  • 1x Eero Beacon in the Master Bedroom

Once everything synced up and the app advised me everything was connected it did a quick firmware update and restarted all 3 devices.  Once they were all showing back online I ran the same speed tests again.

Speed tests from the Eero Gateway

Mobile test from the Kitchen.
Mobile test from the Living Room.
Mobile test from the Bedroom.
Mobile test from the Office.

I find the results pretty compelling and my household is much happier now.  This is not the cheapest router out there but it is a huge improvement  over anything I have used in a long time.  Additionally, this router will never need me to manually upload to

Cloudflare blocking rest API calls from WordPress’ Gutenberg editor.

Recently WordPress has updated their WYSIWYG editor to Gutenberg which is absolutely fantastic!  The only issue thus far is that when editing or updating a post within WordPress you see is the following.

This prevents the auto save and publish functions from working.  WordPress and Cloudflare are working on the issue and have a workaround in place.   The fix involves disabling two rules in the WordPress rules set in the Web Application Firewall settings in your Cloudflare account.

  1. Once you are logged in click on the domain that you need to edit.
  2. Click on Firewall from the top menu.
  3. Scroll down to the section titled IP Firewall Button.
    1. Click the button to the left titled Web Application Firewall.
  4. Look for the section titled Package: Cloudflare Rule Set.
    1. Click Rule Details.
  5. Scroll down to the section titled Cloudflare WordPress and click the link.
  6. Click on page 4 from the pagination at the bottom of the section.
  7. Look for the rules WP0025A and WP0025A.
  8. On the far right side of the section under the Mode heading you will see a drop down list.
  9. Choose disable for both rules.
  10. You should see a green par across the bottom of the screen indicating that the settings are saved.
  11. Click the Close button.
  12. Go back to your WordPress Admin area and try to edit a post.

Unfortunately this workaround has never worked for me even after Gutenberg was updated and Cloudflare pushed out patches on their end.  As a last resort I had to whitelist my IP from the Firewall Events section of the Firewall page.

Now I am once again able to edit posts and whatnot in WordPress!

LEGO has created a life sized and drivable model of a Bugatti Chiron

Shortly after LEGO released a $349, 3,599-piece scale model of the Chiron LEGO has upped their game with a fully life sized and drivable model created out of Lego Technic pieces.

The Chiron uses 339 different Technic elements, many of which are used as load-bearing components. It even has working headlights—featuring the first use of some new types of transparent Techic bricks. The car weighs 3,306lbs (1,500kg), and even the powertrain is made from Lego: 2,304 of the little electric motors to be precise.

This seems like an insanely complex undertaking and I am trilled that the folks over at LEGO were able to pull this off!  If you were wondering if the LEGO  model was able to reach the speeds of the actual Chiron I’m sorry to say that it cannot. 🙁

This gives the Chiron somewhat reduced performance compared to the ones Bugatti makes in Molsheim, France. One of those has 1,500hp (1119kW) and a top speed in excess of 261mph (420km/h); the LEGO Technic Bugatti makes just 5.3hp (3.9kW) and tops out at 12.4mph (20km/h).

LEGO has provided this video to see if in action!

Via Jonathan M. Gitlin @ Ars Technica