Despite having applied multiple updates to varied WordPress installs within the past year, I encountered an issue today with a caching plugin update requiring manual edits to server-side files that I had not come across before.
The particular plugin was W3 Total Cache, but I suppose this problem could affect any plugin depending on author implementation and plugin requirements. In short, the one-click update failed, and the plugin presented an error message explaining the required changes that had not been completed. The problem was that all the changes presented were given in the form of Linux commands, and my server environment is IIS-based.
I’ve dealt with Linux enough to be dangerous, so I was able to translate commands like copy and remove to their DOS counterparts.
cp /path/to/file.txt /newpath/goes/file.txt rm /some/other/file.txt
Become the DOS equivalents:
copy C:\path\to\file.txt C:\newpath\goes\file.txt del C:\some\other\file.txt
Or you can utilize the GUI and simply drag-and-drop or click-delete the files, as I did. Piece of cake.
However, when I encountered the Linux command:
chmod 777 /path/to/file.txt
I had no idea what the command was actually doing, so I had no way of inferring how to implement it in DOS.
After a quick search, I learned that chmod is the Linux command for changing file permissions. The 777 parameter specifically alters permissions to allow read/write/execute permission to anyone. (For an in-depth explanation of the dynamics of the command and its parameters, head over to https://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/ and dive in.)
While I am well-versed in setting file permissions in the Windows GUI, I wasn’t so familiar with similar command-line modifications. Turns out, there’s a command for that:
In DOS, the command becomes:
icacls c:\path\to\file.txt /grant everyone:f
That, as you might be able to surmise, grants everyone full permission to the referenced file.
Sure, I could have simply modified permissions through the GUI, but my innate curiosity wouldn’t let me take the familiar route without knowing how to do it the manual way.