Shell Module
Installing the shell module
See the general module installation instructions.Configuration
Note that the shell is disabled by default. To enable it, navigate in the configuration to /modules/shell/config.
Here are the properties you can set:
| Name | Description |
|---|---|
| enabled | if false the whole functionality is disabled |
| allowedIPs | a comma separeted list of allowed ip adresses (* can be used to define masks) |
| allowedUser | the user who can access the shell (superuser or create a specific shell user who has superuser role) |
| remoteShellEnabled | true if the remote shell (telnet, jconsole) is enabled |
| remoteShellPort | the port used for the remote shell (note that port + 1 is used for direct comunication) |
| servletEnabled | enables the basic servlet |
Usage
To access the shell, you have several options:- Simple servlet : go to /.magnolia/shell
- Convenient browser-based shell : http://hostname:port
- Telnet: hostname:port + 1
Troubleshooting
If your Magnolia instance can't be accessed or used anymore, you can use the shell module to fix its configuration ! Edit theweb.xml and:
- Comment out the Magnolia filter and filter-mapping
- Add the beanshell servlet:
<servlet> <servlet-name>shell</servlet-name> <servlet-class>bsh.servlet.BshServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>shell</servlet-name> <url-pattern>/.magnolia/shell</url-pattern> </servlet-mapping>
You must be aware that this bypasses all security checks, so you should maybe protect your instance through other means while fixing it.