Text File Viewer for ownCloud

miqrogroove
2018-10-20T10:48:09+00:00

This is a little website tool I put together for ownCloud users.

If you enjoy retrieving text files from your cloud server through your phone, it helps to be able to see the text in as few steps as possible.

My viewer App solves two problems:

1. A context menu item provides one-click access to view the file in your browser without the awkward text editor app in the ownCloud website.

2. A text-only directory browser is also provided for situations where the infinite river of file listings takes forever to scroll through on a mobile device.

The app is currently available at https://github.com/miqrogroove/files_textviewer/releases and I am working on adding it to the ownCloud Marketplace.

20 Oct 2018

Category:
Productivity

Tags:

Discuss:
Comments Go Here

OpenVPN tls-auth Option is Critical

miqrogroove
2018-09-19T09:20:44+00:00

Someone attempted a very noisy attack against my router’s built-in OpenVPN server today.  While there was no chance this person could guess my encryption parameters to gain access, he or she did manage to cause a denial of service.

The log excerpt looks like a whole lot of these:

Sep  6 12:40:15 vpnserver1[535]: 148.163.126.72:22475 TLS: Initial packet from [AF_INET]148.163.126.72:22475 (via [AF_INET]%eth0), sid=6a22eb44 5adb63fe
Sep  6 12:40:15 vpnserver1[535]: 148.163.126.72:57036 TLS: Initial packet from [AF_INET]148.163.126.72:57036 (via [AF_INET]%eth0), sid=6a22eb44 5adb63fe
Sep  6 12:40:17 vpnserver1[535]: 148.163.126.72:20089 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sep  6 12:40:17 vpnserver1[535]: 148.163.126.72:20089 TLS Error: TLS handshake failed
Sep  6 12:40:17 vpnserver1[535]: 148.163.126.72:20089 SIGUSR1[soft,tls-error] received, client-instance restarting
Sep  6 12:40:18 vpnserver1[535]: 148.163.126.72:35987 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sep  6 12:40:18 vpnserver1[535]: 148.163.126.72:35987 TLS Error: TLS handshake failed
Sep  6 12:40:18 vpnserver1[535]: 148.163.126.72:35987 SIGUSR1[soft,tls-error] received, client-instance restarting
Sep  6 12:40:19 vpnserver1[535]: 148.163.126.72:55183 TLS: Initial packet from [AF_INET]148.163.126.72:55183 (via [AF_INET]%eth0), sid=6a22eb44 5adb63fe
Sep  6 12:40:19 vpnserver1[535]: 148.163.126.72:12142 TLS: Initial packet from [AF_INET]148.163.126.72:12142 (via [AF_INET]%eth0), sid=6a22eb44 5adb63fe
Sep  6 12:40:20 vpnserver1[535]: 148.163.126.72:50926 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sep  6 12:40:20 vpnserver1[535]: 148.163.126.72:50926 TLS Error: TLS handshake failed
Sep  6 12:40:20 vpnserver1[535]: 148.163.126.72:50926 SIGUSR1[soft,tls-error] received, client-instance restarting

Read the rest of this entry »

6 Sep 2018

Category:
Security

Tags:

Discuss:
Comments Go Here

How to Filter Xfinity Script Injections

miqrogroove
2018-08-28T21:46:52+00:00

Is your Xfinity ISP injecting horrible scripts and dialog messages into every unencrypted website that you visit?  It might look like this:

Xfinity XSS Garbage

We’ve increased Internet speeds in your area.

Update your modem to start enjoying them.

We’ve noticed you have an older modem that can’t keep up with faster Internet speeds now available in your area.

To start enjoying faster Internet, you can:

Buy from a retailer

Before you make your purchase, visit mydeviceinfo.xfinity.com to view a list of modems certified on our network.

Lease an XFINITY Gateway (Comcast lease fees would apply)

Call 1–855–242–2876 to order a Wireless Gateway and we will send you everything you need to get set up.

Thank you for choosing XFINITY. Ensuring that you get the most from your Internet service is part of our commitment to improving your overall experience.

In the Chrome web browser, you can block this with the ComcastBlocker extension.  The Xfinity script still loads, but its effects are minimized by removing all the display elements.

28 Aug 2018

Category:
Security

Discuss:
Comments Go Here

Solving Disconnected Folders Over Wi-Fi

miqrogroove
2018-08-17T13:10:11+00:00

Avoid the First Default Setting for Share Caching

I’m starting to realize that the Offline Files feature in Windows causes more problems than it solves when it comes to unreliable network connections.

In 2016, I described how to minimize the effects of an occasionally high ping when the slow-link mode goes into effect: Offline Files Stay Disconnected

But that doesn’t solve the problem.  Fine-tuning or even disabling the slow-link mode forces the Client Side Cache (CSC) to use its “Action on server disconnect” configuration any time the network isn’t performing perfectly.  The default behavior, “Work offline”, treats each affected (meaning cache-enabled) share as being totally unavailable and then the CSC attempts to retrieve cached copies.  This happens even if the server is still available but failed a single ping check.

Why is this still a problem?  Well, in practice, most files don’t need to be available offline.  By default, the Windows file server is configured, and the Windows client is designed to allow each user to select individual files as “Always available offline” from the file context menu.  When a user selects this option, that one file is copied to the CSC, and in theory that one file is always available.  This allows for targeted use and minimal sync time.  The problem arises with all the other files.  When the CSC goes offline and marks the shared folder as disconnected, it effectively blocks access to all the files that were never cached, even if the server and its files are still available.

At this point, you and I now understand the situation that needs to be avoided.  We don’t want to have a large number of files under the unnecessary clutches of the CSC, regardless of network quality.

Update 08/17/2018

At first, I thought the solution was to change the file server’s default configuration of allowing users to decide which files are cached.  I changed folders that needed maximum online availability to be set to “No files or programs from the shared folder are available offline.”  This server setting automatically disables the CSC.

Unfortunately, the result was that the folders configured for offline caching worked great, but the folders configured for no offline caching only worked until some network error or server reboot.  In this configuration, once a path became disconnected, an Offline Files message is logged in the Event Viewer, and even though no files are being cached the entire path becomes unavailable.  At that point, the workstation persistently throws Error 0x80070035 any time that particular path is accessed, until the workstation is rebooted.

The only solution I’ve found that works now is to completely disable the Offline Files feature on the workstation.  With Offline Files disabled from the Control Panel, the network and server errors are now transient and I am not having any problems with disconnected paths or persistent errors.

Offline Files is ultimately broken and does not improve the Windows experience.

3 Aug 2018

Category:
Systems Engineering

Tags:

Discuss:
Comments Go Here

Windows 2012 Can’t Ping NVR Host

miqrogroove
2018-07-26T23:23:13+00:00

I just resolved a long-term problem where one specific Windows 2012 server was unable to ping one specific device on the same LAN.

There were no relevant resources or similar-looking cases on the web.  Everything else on this LAN worked normally.  The server could ping all other clients, and the clients could ping the server and the NVR.  I just could not get the server to ping the NVR for the life of me.

I suspected at one point that this was a routing issue due to my desire for strong security policies around IOT devices.  This turned out not to be the case as I could find nothing wrong with the router or any routing tables.

At last, I decided this problem was so specific that it could be a bug in the NVR itself.  In this case, the only thing special about the Windows server from the NVR’s perspective was that the server was providing both DHCP and DNS to the NVR.  I tried disabling each service, and found exactly what I was looking for.

The NVR will not respond to pings from its DNS server.

I don’t know why this is broken and don’t really care to investigate any further.  The workarounds are either:

  • Create a DHCP reservation with its own option to specify a 3rd-party DNS server, OR
  • Disable the NVR’s DHCP client and set a static address with an alternative DNS server address value.

In my case, the NVR does not need to use the local DNS server, so this is an easy fix.  So long as my server’s IP address is not used in the NVR DNS configuration, everything works normally and the server can ping the NVR.

26 Jul 2018

Category:
Systems Engineering

Tags:

Discuss:
Comments Go Here

High Resource Use by Start Screen

miqrogroove
2018-04-11T09:59:44+00:00

While diagnosing what I thought was a Windows Update failure, I discovered unrelated massive resource consumption and file scanning activity apparently tied to the Start screen in Windows 2012.

Symptoms:

10 to 20% constant CPU usage by Windows Explorer.

Rapid file scanning or Shared Folder usage in the case of folder redirection.

Triggers:

Resource consumption begins immediately after opening the Start screen and performing a keyboard search.

Closing the Start screen does not help.

Workarounds:

Sign out the current user.  This action will shut down Windows Explorer, preventing the unwanted symptoms until triggered again by a user.

11 Apr 2018

Category:
Systems Engineering

Tags:

Discuss:
Comments Go Here

Virus Infected Email

miqrogroove
2017-12-19T13:09:03+00:00
Screenshot of a fake Office 365 error message.

Danger! Do Not Touch!

If you see a Word document containing the following phrase, it is fake and should be deleted immediately:

This document created in online version of Microsoft Office Word

There is no such message ever issued by legitimate software.

Instructions included with the file asking the user to “Enable content” should raise red flags and serious concerns about the file’s origin.

A quick scan using an online virus checker confirmed this file is infected.  Be careful out there.

19 Dec 2017

Category:
Security

Discuss:
Comments Go Here

Android Studio Setup Error

miqrogroove
2017-06-27T11:29:39+00:00

While installing Android Studio for the first time, I encountered the message below.

The following SDK component was not installed: Google Repository

Simply clicking the “Retry” button allowed the installation to continue successfully.

Relevant log dump quoted below.

java.nio.file.AccessDeniedException: C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository.backup\com\google\android\support\wearable\1.0.0\wearable-1.0.0-javadoc.jar -> C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository\com\google\android\support\wearable\1.0.0\wearable-1.0.0-javadoc.jar
Warning: Failed to move original content of C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository back into place! It should be available at C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository.backup
java.io.IOException: Failed to move away or delete existing target file: C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository
Move it away manually and try again.
Warning: An error occurred during installation: Failed to move away or delete existing target file: C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository
Move it away manually and try again..
Warning: Observed package id 'extras;google;m2repository' in inconsistent location 'C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository.backup' (Expected 'C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository')

Preparing "Install Google Repository (revision: 54)".
Found existing prepared package.
"Install Google Repository (revision: 54)" ready.
Finishing "Install Google Repository (revision: 54)"
Installing Google Repository in C:\Users\{user}\AppData\Local\Android\Sdk\extras\google\m2repository
"Install Google Repository (revision: 54)" complete.
"Install Google Repository (revision: 54)" finished.
27 Jun 2017

Category:
Systems Engineering

Discuss:
Comments Go Here

ownCloud Using Wrong PHP Configuration

miqrogroove
2018-10-20T14:36:36+00:00

The ownCloud community dropped support for Windows Server, so I must resort to documenting such problems here instead of contributing open source.

One major symptom that confirmed ownCloud was using more than one PHP environment on my server was the presence of session handler files in more than one directory.  Specifically, I was finding orphaned files in C:\WINDOWS\Temp even though my one and only php.ini production file specified a different path as well as garbage collection.

I traced the session file generation as far as the ownCloud calendar “app”, which lives in owncloud\apps\calendar\appinfo\remote.php and related places.

Debugging results were fascinating in that not only was the wrong configuration file loaded, after dumping all phpinfo() to disk I also found that the calendar app was running under an entirely different version of PHP.

The culprit:  After the most recent PHP upgrade, my site-specific Handler Mappings ended up with mismatched verb restrictions.  Somehow the new version ended up restricted to GET,HEAD,POST by default, while the old version remained unrestricted.  Although my handlers were in the correct order to give all *.php files to the correct module, any time a CalDAV client sent a PROPFIND or similar request, IIS essentially downgraded to the unrestricted version of PHP.

The solution:  Remove verb restrictions for the ownCloud site’s Handler Mappings, and then remove all but one of the PHP Handler Mappings to prevent any other versions from running without throwing errors.

If you get a bogus error about spaces in “the path to the script processor” when updating verb restrictions, just add double quotes around the path, and then click “No” on the ensuing bogus error about needing to create a new FastCGI application.  (facepalm)

19 Dec 2016

Category:
Systems Engineering

Tags:
,

Discuss:
Comments Go Here

Offline Files Access Denied over VPN

miqrogroove
2016-07-01T17:16:27+00:00

I just tried taking a Windows 10 laptop on the road for the first time.  Everything was great until I tried the VPN for the first time.  Suddenly, I was getting Access Denied errors, and “You do not have permissions” errors for all files made available offline.  I confirmed the VPN tunnel and even browsed to other shared folders on the same server.  The offline files errors persisted after dropping the VPN.

When I returned to the domain Wi Fi, file synchronization completed normally and there were no errors at all.

Am I to believe that Windows 10 is completely incompatible with VPN synchronization?  I never had a problem with this on Windows XP, and I am dreading the months of research and experimentation normally involved in fixing this kind of Microsoft failure.

Read the rest of this entry »

12 Jun 2016

Category:
Systems Engineering

Tags:
,

Discuss:
Comments Go Here