After migrating an openvz container to LXC, we are having some issues with the way ISPConfig mounts the log folder for each website.
Logs reside in /var/log/ispconfig/httpd/website/, but the website roots are in /var/www/whatever
ISPConfig uses bind mount on the log folders, and it's being denied by apparmor on the HN. I've seen some forum posts with a solution that consists on adding this lines to /etc/apparmor.d/lxc/lxc-default, inside the profile section:
Some questions
1) Is it safe to do that? Any security implications?
2) Is there any way to create another profile and assign this particular container to that profile. Something line lxc-container-with-bind-mount
Here's the apparmor error in dmesg:
Thanks,
Julian J. M.
Logs reside in /var/log/ispconfig/httpd/website/, but the website roots are in /var/www/whatever
ISPConfig uses bind mount on the log folders, and it's being denied by apparmor on the HN. I've seen some forum posts with a solution that consists on adding this lines to /etc/apparmor.d/lxc/lxc-default, inside the profile section:
Code:
mount options=(rw, bind),
Some questions
1) Is it safe to do that? Any security implications?
2) Is there any way to create another profile and assign this particular container to that profile. Something line lxc-container-with-bind-mount
Here's the apparmor error in dmesg:
Code:
[322902.652667] audit: type=1400 audit(1470506341.736:1153): apparmor="DENIED" operation="mount" info="failed type match" error=-13 profile="lxc-container-default" name="/var/www/clients/client1/web3/log/" pid=18543 comm="mount" srcname="/var/log/ispconfig/httpd/example.com/" flags="rw, bind"
Thanks,
Julian J. M.