Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunitySetup and InstallationInstallation and Setup (Moderators: scott, DanO, Marty)If you can't get install.bat to work and have no SSH access
Pages: [1]   Go Down
Print
Author Topic: If you can't get install.bat to work and have no SSH access  (Read 259 times)
0 Members and 1 Guest are viewing this topic.
rocknbil
New Member
*

Karma: 0
Offline Offline

Posts: 0


« on: November 17, 2005, 02:17:00 PM »

. . . Here's a decent solution.

This may or may not have been posted but thought I'd offer it up. Some of us can't SSH or telnet to or servers and are restricted to ordinary FTP. To avoid the nightmare of setting permissions one by one, here's a simple solution:

1. Open the ftpscripttxt file provided with the distribution and save it as "cs_permissions.txt." Delete all lines except the site chmod lines. Change those linse to just chmod [command] [path|file], as in

chmod 0777 calendarscript
chmod 0777 calendarscript/cache
chmod 0777 calendarscript/calendars
chmod 0755 calendarscript/lib

Note that lib is 0755; this method gives you the option of **not** world-writing files and directories that don't really require it.

Paste this scriptlet into the text editor of your choice, chmod it to 755, and run it. All you chould have to modify is the first line to the perl interpreter:

#!/usr/bin/perl

print "content-type: text/html\n\n";

print <<"EOHEAD";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Setting Calendar Script Permissions</title>
</head>
EOHEAD

open (F,"cs_permissions.txt") | | ($err = "Cannot open permissions batch file $!");
while (chomp ($line = <F> )) {
 print "attempting to execute $line <br>\n";
 $test = `$line`;
 if ($test) { $err .= "ERROR: $test <br>\n"; }
}
close (F);

print "Should be done. Check it out. <br><br>\n";
print "<\/body><\/html>\n\n";

Upload them both to the same directory as the calendar script directory, call it from the web, and the whole process should be done in about two seconds. It's wise to delete both files after the perms have been set.

Logged
Pages: [1]   Go Up
Print
Jump to: