[pve-devel] [PATCH 8/8] add setup_blockdev_mounts to pve-mount hook

Alexandre DERUMIER aderumier at odiso.com
Sun Aug 16 10:31:46 CEST 2015


Oh, I have done more tests,

and I think the problem is elsewhere.

The hook script seem to already run as root.
(and I see "die "please run as root\n" if $> != 0;" at the begin of the script".


my $raw = PVE::Tools::file_get_contents("/etc/pve/storage.cfg");

is working fine inside hook

but not
my $scfg = PVE::Cluster::cfs_read_file("storage.cfg");



Do you known how I can launch the parser for storage.cfg $raw datas ?





----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Dimanche 16 Août 2015 10:14:00
Objet: Re: [pve-devel] [PATCH 8/8] add setup_blockdev_mounts to pve-mount hook

> > maybe Setgid www-data on lxc hook ? 
> 
> no idea if that works - we need to test. Or is there another/earlier hook 
> where we have full permissions? 

maybe the pre-start hook is better for our needs? 



More information about the pve-devel mailing list