Tuesday, September 06, 2011

secure tmp on openvz container

http://www.faqforge.com/linux/controlpanels/ispconfig2/secure-tmp-and-devshm-directories-in-a-openvz-enviroment/

Create the script:

vi /etc/vz/conf/VPSID.mount


and insert the following lines:

#!/bin/bash mount -n --bind -onosuid,noexec /vz/vps/VPSID/tmp /vz/root/VPSID/tmp mount -n --bind -onosuid,noexec /vz/vps/VPSID/shm /vz/root/VPSID/dev/shm exit ${?}


now make the sscript executable:

chmod 700 /etc/vz/conf/VPSID.mount


No comments:

Related Posts Plugin for WordPress, Blogger...