mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Revert "[fix] Chown only with the user"
This reverts commit 390718263b
.
This commit is contained in:
parent
390718263b
commit
bd45e15f8c
2 changed files with 7 additions and 7 deletions
12
app.py
12
app.py
|
@ -353,7 +353,7 @@ def app_upgrade(auth, app, url=None, file=None):
|
||||||
hook_add(app_id, app_tmp_folder +'/hooks/'+ file)
|
hook_add(app_id, app_tmp_folder +'/hooks/'+ file)
|
||||||
|
|
||||||
# Execute App upgrade script
|
# Execute App upgrade script
|
||||||
os.system('chown -hR admin %s' % install_tmp)
|
os.system('chown -hR admin: %s' % install_tmp)
|
||||||
if hook_exec(app_tmp_folder +'/scripts/upgrade') != 0:
|
if hook_exec(app_tmp_folder +'/scripts/upgrade') != 0:
|
||||||
#TODO: display fail messages from script
|
#TODO: display fail messages from script
|
||||||
pass
|
pass
|
||||||
|
@ -459,7 +459,7 @@ def app_install(auth, app, label=None, args=None):
|
||||||
else:
|
else:
|
||||||
app_setting(app_id, 'label', manifest['name'])
|
app_setting(app_id, 'label', manifest['name'])
|
||||||
|
|
||||||
os.system('chown -R admin '+ app_tmp_folder)
|
os.system('chown -R admin: '+ app_tmp_folder)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if args is None:
|
if args is None:
|
||||||
|
@ -469,7 +469,7 @@ def app_install(auth, app, label=None, args=None):
|
||||||
args_dict = {}
|
args_dict = {}
|
||||||
|
|
||||||
# Execute App install script
|
# Execute App install script
|
||||||
os.system('chown -hR admin %s' % install_tmp)
|
os.system('chown -hR admin: %s' % install_tmp)
|
||||||
# Move scripts and manifest to the right place
|
# Move scripts and manifest to the right place
|
||||||
os.system('cp %s/manifest.json %s' % (app_tmp_folder, app_setting_path))
|
os.system('cp %s/manifest.json %s' % (app_tmp_folder, app_setting_path))
|
||||||
os.system('cp -R %s/scripts %s' % (app_tmp_folder, app_setting_path))
|
os.system('cp -R %s/scripts %s' % (app_tmp_folder, app_setting_path))
|
||||||
|
@ -478,7 +478,7 @@ def app_install(auth, app, label=None, args=None):
|
||||||
shutil.rmtree(app_tmp_folder)
|
shutil.rmtree(app_tmp_folder)
|
||||||
os.system('chmod -R 400 %s' % app_setting_path)
|
os.system('chmod -R 400 %s' % app_setting_path)
|
||||||
os.system('chown -R root: %s' % app_setting_path)
|
os.system('chown -R root: %s' % app_setting_path)
|
||||||
os.system('chown -R admin %s/scripts' % app_setting_path)
|
os.system('chown -R admin: %s/scripts' % app_setting_path)
|
||||||
app_ssowatconf(auth)
|
app_ssowatconf(auth)
|
||||||
msignals.display(m18n.n('installation_complete'), 'success')
|
msignals.display(m18n.n('installation_complete'), 'success')
|
||||||
else:
|
else:
|
||||||
|
@ -514,8 +514,8 @@ def app_remove(auth, app):
|
||||||
shutil.rmtree('/tmp/yunohost_remove')
|
shutil.rmtree('/tmp/yunohost_remove')
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
os.system('cp -a %s /tmp/yunohost_remove && chown -hR admin /tmp/yunohost_remove' % app_setting_path)
|
os.system('cp -a %s /tmp/yunohost_remove && chown -hR admin: /tmp/yunohost_remove' % app_setting_path)
|
||||||
os.system('chown -R admin /tmp/yunohost_remove')
|
os.system('chown -R admin: /tmp/yunohost_remove')
|
||||||
os.system('chmod -R u+rX /tmp/yunohost_remove')
|
os.system('chmod -R u+rX /tmp/yunohost_remove')
|
||||||
|
|
||||||
if hook_exec('/tmp/yunohost_remove/scripts/remove') != 0:
|
if hook_exec('/tmp/yunohost_remove/scripts/remove') != 0:
|
||||||
|
|
2
hook.py
2
hook.py
|
@ -55,7 +55,7 @@ def hook_add(app, file):
|
||||||
|
|
||||||
finalpath = hook_folder + action +'/'+ priority +'-'+ app
|
finalpath = hook_folder + action +'/'+ priority +'-'+ app
|
||||||
os.system('cp %s %s' % (file, finalpath))
|
os.system('cp %s %s' % (file, finalpath))
|
||||||
os.system('chown -hR admin %s' % hook_folder)
|
os.system('chown -hR admin: %s' % hook_folder)
|
||||||
|
|
||||||
return { 'hook': finalpath }
|
return { 'hook': finalpath }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue