Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 1.44 KB

File metadata and controls

45 lines (37 loc) · 1.44 KB

Module Permissions

Daemon-scripts of the modules (setup/install.php & setup/deinstall.php as well as daemon.php) are executed with the user web server by default. However, some operators may need extended access (root rights).

Since Version 1.0.1, these files can be marked with additional parameters (Shebang). As a result, these daemon scripts are executed with root rights.

Set the following Shebang at the beginning of the line so that the script is executed with extended rights:

#!fruithost:permission:root

When the Daemon is running, the modules that are running with extended rights are marked:

EXECUTING_PREVIEW

Example

Normal execution

<?php
    /*
        Will be executed by webserver (user "www-data")
    */
	
    print_r([
		'Server'	=> $_SERVER['USER'],
		'Exec'		=> exec('whoami')
	]);
?>
Output

EXECUTING_DEFAULT

Execution with root rights

#!fruithost:permission:root
<?php
    /*
        Will be executed by webserver (user "root")
    */

	print_r([
		'Server'	=> $_SERVER['USER'],
		'Exec'		=> exec('whoami')
	]);
?>
Output

EXECUTING_ROOT