is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 13 years ago

Closed 13 years ago

#878 closed new feature (invalid)

Automatically chown and chmod for jelix-script

Reported by: Owned by:
Priority: normal Milestone:
Component: jelix-scripts Version: 1.1
Severity: normal Keywords: script jelix-script
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


I think it is possible to add the php command shell_exec() in the jelix script to do automatically the chown and chmod command for a new app.

Change History (2)

comment:1 Changed 13 years ago by

I try this code and it may work :

try {
	$cmd = "chown -R www-data:www-data ".$APPNAME."/var/log temp/".$APPNAME."/";
	echo "<debug>".$cmd."</debug>\n"; 
	shell_exec ($cmd);
	$cmd2 = "chmod 755 -R ".$APPNAME."/var/log temp/".$APPNAME."/";
	echo "<debug>".$cmd2."</debug>\n"; 
	shell_exec ($cmd2);	
} catch(Exception $e) {
	echo "Error: ".$e->getMessage(),"\n";

comment:2 Changed 13 years ago by laurentj

  • Component changed from jelix to jelix-scripts
  • Resolution set to invalid
  • Status changed from new to closed

This is already done. You have to configure your scripts.conf.php. And your solution is bad: it will fail on windows.

Note: See TracTickets for help on using tickets.