Prewords / -Introduction to setting up Freedomeditor
Ch 1 - Install "replace on files in a folder" function
a on BSD/UNIX
b on Windows
Ch 2 -
1 Install archive extraction functionality for freedomeditor
a BSD/UNIX
b Windows
2 Archive extract/create compatibility notes
a Archive type compatibility list for extraction/unpacking
b About non freebsd systems
Ch 3 - Configure a webserver for sudo usage (UNIX/BSD)

### =

=

Prewords / - Introduction to setting up freedomeditor:
You should have received a copy of the GNU General Public License Version 3, 29 June 2007
along with this program. If not, see <http://www.gnu.org/licenses/>.

#

Unzip to your webserver in some folder. Make sure the permissions are correct (the files you want to edit need write access). Edit the config.css to suit your needs, or try the defaults which will work fine to begin with.
Security message:
Do not put this whole script in a production environment without taking pre-cautions which were the direct result of extensive research. (at minimal effort, remove the editor& core client since it most likely contains vulnerable code, and try the JOOMLA Security strike team website for some global pointers).
Using freedomeditor on any webserver might cause mayor security leaks, even without installing extra functionalities which are described in this document. Use only on localhost and prevent serving untrusted domains.
If you are not sure what this means,
add
Listen:127.0.0.1:80 to your httpd.conf
and comment the
#Listen: 80

### =

=

Chapter 1:
Install replace function:

A - FREEBSD/UNIX:
copy the freedomeditor/core_clients/bgb_cmdline/sedfdrepl/sedfolder.sh to a registered path within your bash environment,
you can find them out by writing "set |grep PATH" in phpterm (NOTE: do not ask original author of phpterm for technical support for freedomeditor phpterm core_client.)
i use /bin..
Example:
$ cp core_clients/bgb_cmdline/sedfdrepl/sedfolder.sh /bin
$ chmod 755 /bin/sedfolder.sh

B - Windows (note: untested):
step 1 method a:
Download + install cygwin
Make sure to install bash in cygwin.
Make sure to install sed also.
One must install apache+php on cygwin else it will not use the cygwin shell, but the windows shell.
step 1 method b (might not work due to winbash limitations):
Download winbash
Download "sed" (streameditor) for win32
Copy the executable to a PATH registered environment (write "set" in phpterm to see valid ones)

### =

=

Chapter 2:
1 Install archive creation/extraction functionality
step 1:
install the relevant packages.
Commands used are zip, unzip, tar, unstuff, unarj, lha, unrar and zoo on linux. (if you search the net you might find win32 cmd line versions). On windows, native support for 7zip archive extraction / creation can also be used. Goto settings menu, make sure the zip binary setting is a hard absolute reference to 7z.exe. Freedomeditor will detect windows, and will default 7zip to widely used zip extraction and creation settings.

A - BSD/UNIX:
(aateau= Any archive type extractor and/or unpacker)
step 2:
$ cp core_clients/bgb_cmdline/installers/aateau/aateau.sh /bin
$ chmod 755 /bin/aateau.sh

B - Windows:
step2:
apply chapter 1 B step 1

2 Archive extract/create compatibility notes:
a Archive type compatibility list for extraction/unpacking (linux):
zip
rar
tar
gz
tbz
bz2
arj
arc
lzh
lha
zoo
sit
b About non freebsd systems:
Aateau uses hard references to /usr/local/bin/ for commands, which might need to be changed for other operating systems, unless you move all the extraction executables to /usr/local/bin, or create symlinks.
On windows, they might need to be installed into apache_hdd:\usr\local\bin.

### =

=

Chapter 3:

Configure a webserver for sudo usage (UNIX/BSD)
To run the replace-on-folder command as a different user (not needed on windows) with sudo, one should add something like:
www ALL=(ALL) NOPASSWD: SETENV: ALL
to the /usr/local/etc/sudoers file (especially note the NOPASSWD).
One might want to replace that with something securitywise more sane, and could try the command
"$ man sudoers"
to learn how to limit access to preset commands serverwise.
(read other chapters to learn where to find the relevant used commands)
I haven't tested it but a nice solution might be limiting commands to:
sudo -u yourusername aateau.sh
and
sudo -u yourusername sedfolder.sh
Sedfolder.sh is a powerful and easy usable command so one might even want to:
$ chown username sedfolder.sh
$ chmod 700 sedfolder.sh
to limit it's access only to a development (sudo) system useraccount.