New Perl Script Sets chmod Permissions for YaBB Forum Upgrades

| | TrackBacks (0)

Quick shout-out to Peter S. (who lives in Baltimore). He helped me create a Perl script to change permissions (CHangeMODe) for the files-n-folders (located on the Rad server) that pertain to upgrading (actually installing) YaBB .. something that's been occurring with greater frequency.

YaBB: Yet aother Bulletin Board

Peter read where I wrote (on Jan 6th):

The worst part of "upgrading" YaBB (actually » installing) is chmod'ing all the files (setting file permissions .. to either 755 or 666). There are nearly a thousand files which need permissions set. Tedious maximus. Takes a while. (I hate it.)

I say "he helped me," but actually, he did most of the work himself, leaving only enough undone to help me learn some basic Perl scripting techniques.

We've been trading emails off-n-on (as time permits) the past few weeks. Now I have a script that works perfectly. It will save me untold hours of mind-numbing tedium. So I'm pretty stoked.

••• today's entry continues here below •••

Note the boyz at YaBB offer two downloadable versions of their forum-script software: one *.zip and one *.tar.gz. The *.zip is used for/as a local copy of the forum (unzipped here on my laptop).

The *.tar.gz is uploaded to the server (« physically located in Chicago), where it's extracted .. using the Linux shell Bash command: tar -xzf. This method is supposed to preserve correct permission settings that are set when the program is created .. but (for some reason) doesn't.

I'm still waiting for a mod (that I use) to be upgraded, so it'll work with YaBB.231 .. before completing the upgrade (to the Rad forums). The mod-guys usually never take this long.

UPDATE » Magoo writes to say there's a switch for tar that is designed to preserve permissions ( -p ). I am going to try and see if it works.

UPDATE-2 » Could not get tar command to run when using -p switch. No idea why.

UPDATE-3 » Had to put -f switch last. tar ran fine, and most permissions look good, tho a significant number are NOT what the YaBB install guide say they should be.

« Previous Rad entry ||| NEXT Rad entry »

0 TrackBacks

Listed below are links to blogs that reference this entry: New Perl Script Sets chmod Permissions for YaBB Forum Upgrades.

TrackBack URL for this entry:

About this Entry

This page contains a single entry by Rad published on January 25, 2009 9:29 PM.

Best Language to Learn Introductory Computer Programming » Scheme | SICP & HtDP was the previous entry in this blog.

Structure & Interpretation of Computer Programs | SICP's Wizardly Intro to Computer Science & Programming is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.