Changes

Jump to navigation Jump to search
m
Adjusting header(s)
Line 1: Line 1:  
<div class="CHAPTER">
 
<div class="CHAPTER">
=The server-manager web interface=
+
==The server-manager web interface==
    
The user interfaces to the SME Server (the web based server-manager and the text mode console interface) perform their work by modifying the master system configuration database to describe the new system configuration, then regenerating the various application configuration files by <span class="emphasis">''signalling an event''</span>.
 
The user interfaces to the SME Server (the web based server-manager and the text mode console interface) perform their work by modifying the master system configuration database to describe the new system configuration, then regenerating the various application configuration files by <span class="emphasis">''signalling an event''</span>.
Line 9: Line 9:  
----
 
----
   −
==The web directory==
+
===The web directory===
    
The primary files which make up the SME Server manager are kept in the <tt class="FILENAME">/etc/e-smith/web/</tt> directory. These files define the layout of the web functions and require auxiliary files which provide translations and the implementation of the functions.
 
The primary files which make up the SME Server manager are kept in the <tt class="FILENAME">/etc/e-smith/web/</tt> directory. These files define the layout of the web functions and require auxiliary files which provide translations and the implementation of the functions.
Line 54: Line 54:  
----
 
----
   −
==Web function scripts==
+
===Web function scripts===
    
The <tt class="FILENAME">functions</tt> subdirectory contains all of the screen definitions for all panels. Each screen definition is a CGI script which displays the screen and also handles the CGI form submission. The scripts are written using the <code class="CLASSNAME">CGI::FormMagick</code> toolkit, which separates the screen layout from the panel implementation code, facilitates form validation and provides full support for localisation of the manager.
 
The <tt class="FILENAME">functions</tt> subdirectory contains all of the screen definitions for all panels. Each screen definition is a CGI script which displays the screen and also handles the CGI form submission. The scripts are written using the <code class="CLASSNAME">CGI::FormMagick</code> toolkit, which separates the screen layout from the panel implementation code, facilitates form validation and provides full support for localisation of the manager.
Line 61: Line 61:  
----
 
----
   −
===An overview of FormMagick===
+
====An overview of FormMagick====
    
<div class="SECT3">
 
<div class="SECT3">
   −
====Layout of a FormMagick script====
+
=====Layout of a FormMagick script=====
    
This section describes the FormMagick panel which is used in [http://wiki.contribs.org/The_SME_Server_Developer%27s_Guide#EXERCISE5 the Section called ''Exercise 5: Adding a user interface screen'' in Chapter 12]. A typical FormMagick web function starts with the script preamble, which notes it as a perl script and informs the vi editor that the majority of the file is XML, rather than perl.
 
This section describes the FormMagick panel which is used in [http://wiki.contribs.org/The_SME_Server_Developer%27s_Guide#EXERCISE5 the Section called ''Exercise 5: Adding a user interface screen'' in Chapter 12]. A typical FormMagick web function starts with the script preamble, which notes it as a perl script and informs the vi editor that the majority of the file is XML, rather than perl.
Line 95: Line 95:  
----
 
----
   −
====The FormMagick XML description====
+
=====The FormMagick XML description=====
    
The FormMagick XML is divided into a preamble and then a set of pages. The preamble contains references to the title, header and footer of the page. These are usually the same on all pages so that a consistent header and footer is displayed.
 
The FormMagick XML is divided into a preamble and then a set of pages. The preamble contains references to the title, header and footer of the page. These are usually the same on all pages so that a consistent header and footer is displayed.
Line 163: Line 163:  
----
 
----
   −
===Navigation metadata===
+
====Navigation metadata====
    
The web manager's navigation frame is generated automatically by examining the contents of the <tt class="FILENAME">/etc/e-smith/web/functions/</tt> directory.
 
The web manager's navigation frame is generated automatically by examining the contents of the <tt class="FILENAME">/etc/e-smith/web/functions/</tt> directory.
Line 198: Line 198:  
----
 
----
   −
===Permissions and security===
+
====Permissions and security====
    
The CGI scripts must have elevated permissions (setuid <var class="LITERAL">root</var>) in order to write to the configuration database, since they will be run by the web server (which runs as user <var class="LITERAL">www</var>). To ensure that these scripts can only be run by system administrators, the permissions on the parent directory and the scripts are set so that only the members of the <var class="LITERAL">admin</var> group can run them. These panels are also restricted in the web server configuration so that only the <var class="LITERAL">admin</var> user can access them.
 
The CGI scripts must have elevated permissions (setuid <var class="LITERAL">root</var>) in order to write to the configuration database, since they will be run by the web server (which runs as user <var class="LITERAL">www</var>). To ensure that these scripts can only be run by system administrators, the permissions on the parent directory and the scripts are set so that only the members of the <var class="LITERAL">admin</var> group can run them. These panels are also restricted in the web server configuration so that only the <var class="LITERAL">admin</var> user can access them.
Line 205: Line 205:  
----
 
----
   −
==Common files==
+
===Common files===
    
The <tt class="FILENAME">common</tt> subdirectory contains any static files (such as images) which are used by multiple panels.
 
The <tt class="FILENAME">common</tt> subdirectory contains any static files (such as images) which are used by multiple panels.
Line 212: Line 212:  
----
 
----
   −
==Panel definitions==
+
===Panel definitions===
    
The <tt class="FILENAME">panels</tt> directory contains the panel definitions. There is one subdirectory for each panel. Each panel must have html and cgi-bin subdirectories. The cgi-bin subdirectory should contain only symbolic links to the actual CGI scripts in the functions directory, and the html directory should contain the main index.html file for the panel, as well as any required navigation links.
 
The <tt class="FILENAME">panels</tt> directory contains the panel definitions. There is one subdirectory for each panel. Each panel must have html and cgi-bin subdirectories. The cgi-bin subdirectory should contain only symbolic links to the actual CGI scripts in the functions directory, and the html directory should contain the main index.html file for the panel, as well as any required navigation links.
Line 224: Line 224:  
Keeping the CGI scripts for all panels in a shared directory makes it much easier to create auxiliary panels with slightly different options and permissions. You can just copy the entire panel directory, then customize the access permissions and navigation links. For example, it would be very straightforward to create a password-protected panel which only allowed the creation and deletion of user accounts. That task could be delegated to administrative staff.
 
Keeping the CGI scripts for all panels in a shared directory makes it much easier to create auxiliary panels with slightly different options and permissions. You can just copy the entire panel directory, then customize the access permissions and navigation links. For example, it would be very straightforward to create a password-protected panel which only allowed the creation and deletion of user accounts. That task could be delegated to administrative staff.
   −
</div></div></div><div class="PART"><div class="TITLEPAGE">
+
</div></div></div>
 
  −
=III. How to create an SME Server package - step by step=
  −
 
  −
<div class="TOC">
  −
 
  −
; '''Table of Contents'''
  −
; 11. [http://wiki.contribs.org/The_SME_Server_Developer%27s_Guide#GETTING-STARTED Getting started]
  −
; 12. [http://wiki.contribs.org/The_SME_Server_Developer%27s_Guide#TUTORIAL Getting to know how to customize the SME Server]
  −
; 13. [http://wiki.contribs.org/The_SME_Server_Developer%27s_Guide#APPLICATION-PACKAGING Packaging your application]
  −
; 14. [http://wiki.contribs.org/The_SME_Server_Developer%27s_Guide#AEN1577 The SME Server development environment]
  −
 
  −
</div></div>
 

Navigation menu