Installing Wrappers

From The AgoraCart Project

Jump to: navigation, search

LINUX:

NOTE: If your hosting does not allow you to use CC or GCC compileres, you can use pre-complied wrappers for these various kernals (links below). You will need to un-tar the files in your the protected directory of your store. The command to un-tar the pre-compiled files/tarballs is:

tar -xvpf filenamehere.tar



After un-tarring the pre-compiled wrappers in the protected directory of your store, move the wrap_agc.o file up one level to where the agora.cgi file resides, using this at the command line in SSH2/Telnet:

mv wrap_agc.o ../wrap_agc.o



If using the a+s wrappers, you should not have to do anything else. If you need to chmod the wrapper to run uner your ID (such as uploading/moving a file via FTP), then you must complete the following for each file using SSH2 or telnet running under your hosting account ID:

Un-tarred Install Method:
1) Navigate to store's protected sub-directory. Then type:
chmod a+s wrap_mgr.o



2) Navigate to store's main directory where agora.cgi and the wrap_agc.o reside. Then type:
chmod a+s wrap_agc.o



FTP Upload Install Method:
1) Navigate to store's protected sub-directory. Then type:
chmod 555 wrap_mgr.o
chmod a+s wrap_mgr.o



2) Navigate to store's main directory where agora.cgi and the wrap_agc.o reside. Then type:
chmod 555 wrap_agc.o
chmod a+s wrap_agc.o



Pre-Compiled 2.2 kernal Wrappers - linux_22_wrap.tar
Pre-Compiled 2.4 kernal Wrappers - linux_24_wrap.tar
Pre-Compiled 2.4 kernal Wrappers - linux_24_a+s_wrap.tar
Pre-Compiled 2.6 kernal Wrappers - linux_26_wrap.tar
Pre-Compiled 2.6 kernal Wrappers - linux_26_a+s_wrap.tar



You will need TELNET or SSH access to complete steps below ... You may also try the manual compiling method outlined below on Linux systems:

PART 1: Directions for wrap_agc.c:

1a) upload wrap_agc.c (ascii mode) to same location as the agora.cgi file. In newer versions it is already there.


1b) Compile this C program (use cc if you don't have gcc):
gcc -o wrap_agc.o wrap_agc.c


2) Set permissions on the wrapper so it runs under your id:
chmod 555 wrap_agc.o
or chmod 4555 wrap_agc.o (some servers this works also/instead)
chmod a+s wrap_agc.o (some servers this works OK)


3) Agora.cgi will detect the wrapper and use it automatically if it is properly placed in the same directory.


PART 2: Directions for wrap_mgr.c:

1a) upload wrap_mgr.c (ascii mode) to same location as the manager.cgi file ... in the store's /protected directory. In newer versions it is already there.



1b) Compile this C program (use cc if you don't have gcc):
gcc -o wrap_mgr.o wrap_mgr.c



2) Set permissions on the wrapper so it runs under your id:
chmod 555 wrap_mgr.o
or chmod 4555 wrap_mgr.o (some servers this works also/instead)
chmod a+s wrap_mgr.o (some servers this works OK)


3) Manager.cgi will detect the wrapper and use it automatically if it is properly placed in the same directory.



SOLARIS:

You probably do not need a wrapper program, as modern Solaris kernels have the code to allow for SUID bit to be properly set on your scripts in case your web server does not automatically do that for you. From your TELNET or SSH session or commando in the store manager, use the commands:

chmod a+s agora.cgi (from the main directory)
chmod a+s manager.cgi (from the ./protected directory)

That should enable scripts to run under the acct owner's id, provided that those files are "properly owned" by the account owner. Also, this assumes your http server allows SUID programs to be executed. If your web server does not allow the execution of SUID programs, you can then compile and install the wrappers.




FreeBSD and Other Unix or Unix-like OS:

Try to use the SUID bit on the script, or ask your system administrator if the SUID bit works with scripts. If it does not or you prefer to use the wrapper program, just follow the directions in the comments at the top of each wrapper program. If that doesn't work consult your system administrator or tech support dept. at your hosting company. Use Telnet or SSH access to complete the comiling process. In some cases, you can use the commando screen uif your store manager is able to run.

Manual Wrapper compile Directions for wrap_agc.c:

1a) upload wrap_agc.c (ascii mode) to same location as the agora.cgi file. In newer versions it is already there.

1b) Compile this C program (use cc if you don't have gcc):

gcc -o wrap_agc.o wrap_agc.c

2) Set permissions on the wrapper so it runs under your id:

chmod 555 wrap_agc.o
chmod a+s wrap_agc.o (some servers this works OK)

3) Agora.cgi will detect the wrapper and use it automatically if it is properly placed in the same directory.

Directions for wrap_mgr.c:

1a) upload wrap_mgr.c (ascii mode) to same location as the manager.cgi file ...
in the store's /protected directory. In newer versions it is already there.

1b) Compile this C program (use cc if you don't have gcc):

gcc -o wrap_mgr.o wrap_mgr.c

2) Set permissions on the wrapper so it runs under your id:

chmod 555 wrap_mgr.o
chmod a+s wrap_mgr.o (some servers this works OK)

3) Manager.cgi will detect the wrapper and use it automatically if it is properly placed in the same directory.

Personal tools
Attribution-Noncommercial-No Derivative Works 3.0 Unported Content is available under Attribution-Noncommercial-No Derivative Works 3.0 Unported.
This page was last modified 19:33, 25 July 2008.    This page has been accessed 6,499 times.   
Site Meter