Skip to content

Blog

Copy files, change permissions, and change owner/group

While you can cp, chown, and chmod a file (usually with sudo) to manage a file move, the install command is also for moving files (it’s not for installing things, apparently) and setting various file-level details during the move ; combining with sudo this can be a single command to perform all the necessary actions to move files between various locations!

sudo install -C -m 775 -o sk -g ostechnix /dir1/file1 /dir2

While you can use this command as a replacement for cp, if you do not explicitly set permissions on the operation, this will result in execution permissions being applied. However, this, as the command is probably intended, is helpful for deploying scripts in the correct state.

Source: How To Copy Files And Change The Ownership, Permissions At The Same Time

While the news on TP-Link has been pretty awful from a security perspective, recent updates to their Deco line have me really happy. The Deco line of routers is divided by model and further subdivided by the firmware version they receive. Just before Christmas, my X55 got updated that I had been waiting on since this summer! The update finally brought Wireguard VPN to the router, and while an earlier update allowed for other types of VPNs, such as the ancient L2TP/IPSec or OpenVPN, I really wanted to get a Wireguard setup. Wireguard provides several benefits over traditional VPNs:

  1. Connection resiliency: switching from wired to WiFi or cellular doesn't phase the connection; your VPN stays active.
  2. Speed and performance: Wireguard is extremely fast as compared to other VPNs.
  3. Battery performance on mobile: the lightweight protocol and efficient means much less battery drain.
  4. On-demand: The mobile app allows iOS devices to be configured to always route traffic when not at home to ensure that my connection is always on and secure (read: private).
  5. Easy access to devices at home: I have a couple of devices and computers I access when out and about that Wireguard allows me to seamlessly connect to while on the go.

Previously, I had been using Tailscale to provide a lot of these services and keep my connections safe and secure. And I still highly recommend the service; it's really incredible if you don't have access to Wireguard on your router or need advanced routing capabilities for a home lab or even at a large corporation. I wish more companies used services like Tailscale as it provides really easy access to on-prem or cloud resources with a lightweight client. But by self-hosting Wireguard, I can assure my connection back to the house for all my devices without relying on external providers and without having to host complicated servers. Of course, many routers provide Wireguard access, and someone with the know-how can easily set up a server to host and run a Wireguard server to provide this same setup. But I like to keep things simple, and Deco's implementation is exactly that.

It is hard to overstate how nice on-demand is for mobile devices when out and about. Since setting it up, I've been able to move from home to mobile and never miss a beat, all while maintaining a connection back to the house. Now I can take my iPhone and iPad and still connect back to my Mac Mini at home as though I am still there. Another device I access on the go often I recently got is my Tablo TV. It allows me to watch over-the-air TV via their app on my smart devices. With Wireguard, I have easy access to it as well to watch live streams of TV or recorded shows from anywhere. I will probably do a longer post on my thoughts on it later.

Another feature I just started playing with is, in addition to creating a VPN server with my Deco, I can configure a VPN client that lets me have all or select devices connect to an external Wireguard VPN service such as NordVPN, ProtonVPN, or Surfshark. This lets me route my devices at home through alternative VPNs. This allows for privacy for home connections and all kinds of other possibilities for obscuring traffic.

Any chance to set up a VPN is recommended, especially if you can get one connected back to your home router. This is, of course, all improved since we have access to fiber here at the house, and your own mileage may vary.

Subscribe to my feed

If you are interested in subscribing to my feed, the easiest method is to copy my blog's URL address and paste it into your favorite RSS feed application. Mine is the wonderful NetNewsWire which has apps for Mac, iPad, and iPhone and are all fantastic! But there are many options out there and I encourage you to find one you like, but NetNewsWire has the wonderful status of being open source and well crafted to only do one thing, read RSS feeds. Many of the other feed readers you will find require an account and want to do more than you need. The developer is really committed to this idea!

So copy my site’s URL, add a feed in NetNewsWire using the + icon, and press Add. Optionally (and recommended) choose the iCloud folders so that your feeds sync to all your devices and show up automatically. That should be all that is required.

If you use something else to manage your RSS feeds, then I assume you can figure out how to subscribe there. But if you are interested in giving NetNewsWire a try, you can export and import your subscriptions as an OPML file that will magically migrate them there.

Hello World!

I've been contemplating restarting my website for a while, and since I've been doing more work with MKDocs and containers at work, I took the plunge and set up this site. Previously, I was using a WordPress site, which I intend to keep running for a bit and slowly move over here. I have not decided if I will move the old posts over or just import them into a WordPress.com site to host the pages in perpetuity. I have also looked at options that would migrate the posts from WordPress over to Markdown and post them here. But it depends on how much I can get pulled from my current site and if it seems to be worth the effort. Either way, I hope to start utilizing this a lot more and document the process I use to set up the site and other projects I'm working on. One big change is there will be a lot less personal family stuff posted here; I'll move most of that to other forms of social media.

For the host, I'm using GitLab Pages. I have slowly started to move more and more code there as I really like their feature set. I know most of the world uses GitHub for hosting code and sites, but I had a lot of experience with GitLab from my previous employer, so the transition was easy.

If you've never used Material for MKDocs, I highly recommend it. There are lots of other static site generators out there -- and they may even be better suited for your needs -- but being Python-based, fully supporting Markdown for all of the writing, and offering a dead-simple approach to managing everything with a single YAML file, it was hard to resist. Material started out as a theme for MKDocs, -- which in turn was an evolution of ReadTheDocs -- meaning these are geared primarily towards writing documentation. There is ample support for writing great documentation, but you can also just use it as a blogging platform as well. This setup can be tricky, but once you get everything set just right, there is not much to change or update. Since it's all Python under the hood, the support is pretty broad, and GitLab Pages doesn't charge for static sites that are generated. It's a really great option if you want to get set up. I'm publishing my setup so that anyone interested in setting up their own version can steal as needed, and I plan on doing a more official write-up on the process later. For now, I'm just excited to get started on this as a new project and see where it takes me. The best part is that since the content is all just text files and all open source, I can truly take my content anywhere, even just host it on a home server, and the cost should stay extremely low while being easy to migrate. No more WordPress exports!