JSEdit

JSEdit is an HTML editor written in JavaScript.

Online demo

Installation

Command line access with sudo permission is required.

Download edit.zip and unzip it in the /var/www/z_edit/ folder.

Apache configuration

Add this to either your goblal configuration or your <VirtualHost> block :

Alias /.edit/ /var/www/z_edit/
<Directory /var/www/z_edit/>
	RewriteEngine On
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^ /.edit/edit.html
</Directory>
Script PUT /.edit/put.php

Compilation

Since PHP runs as www-data and cannot modify files owned by you, two setuid programs are provided to give PHP the necessary permissions to edit the files.

To compile the required two setuid C programs, run the following lines :

chmod +x putsetup.sh
./putsetup.sh

When asked, provide the username and password that will be used to upload changes (HTTP authentication).

Since putsetup.sh requires sudo permission to compile the programs, you will also need to provide your sudo password.