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

Opened 12 years ago

Closed 12 years ago

#878 closed new feature (invalid)

Automatically chown and chmod for jelix-script

Reported by: jeremie.walter 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:

Description

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 12 years ago by jeremie.walter

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";
	exit(1);
}

comment:2 Changed 12 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.