New Temporary Folder Arrangements Tidying Tutorial

New Temporary Folder Arrangements Tidying Tutorial

New Temporary Folder Arrangements Tidying Tutorial

We’ve had one public and three private dedicated virtual servers running our Apache/PHP/MySql web server here at RJM Programming. The last two have us transitioning from one AlmaLinux web server to another. What could be different? Well (readers who resist reading blog posting titles) security measures move on with a lot of upgrades and migrations in web server “land” these days. On ours, the use of …


/tmp

as per


# df -k /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 103019024 58818836 38940980 61% /
# df -k /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 4054752 1108 3843932 1% /tmp
#

… have in the last AlmaLinux web server incarnation become more contentious in that the RJM Programming web server username (as distinct from the administrator of cPanel username) is unable to write to this /tmp for the first time. This is a little bit of a peeve for us, as we have written quite a bit of PHP that uses it to read and write from, as it’s temporary storage “place of choice”.

There’s no way we are going to rush to remedy this, but, today, after self-ruling out, after discussion with our web hosters, Crazy Domains, the thought of changing any file permissions here, we’re starting, sort of at the back end of the issue, fixing for the future …

  • crontab # ie. scheduled …
  • file tidying (after PHP action) processes

You can glean what we did via watching today’s tutorial animated GIF presentation, but the gist of it involved …

  • in RJM Programming cPanel’s Terminal window …

    crontab -l | grep '/tmp'

    … and copy into a text buffer …
  • back in the macOS MacBook Air desktop application woooorrrrllllddd paste into a TextWrangler editor new file … and then …
  • for relevant records substitute /tmp for /home/rjmprogr (as our new choice of place to act as the temporary storage “place of choice” and which we successfully road tested when we presented the Message Board One Liners Aesthetics Tutorial (with it’s, early days, changed prepend.php) thread of blog postings)
  • change the minutes field 10 less for all such records
  • copy this into a buffer
  • back at RJM Programming cPanel’s Terminal window …

    crontab -e

    … ours uses the great vi editor where we get to the end character and type “i” for insert in order to Paste (via top menu) into the crontab file … followed by “wq” to save (with all being well will result in …

    crontab: installing new crontab

    )

  • readying ourselves for either “tidying up” requirement into the future

Over to you … PHP!

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Hardware, Operating System, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *