Hello Richard,<div><br></div><div>you're right. At some point we had some issues with libvirt and kvm, and the way they handle disk image files ownership and permissions, that's the reason why we have those chmod's. However we can remove them provided that the opennebula administrator configures libvirt properly to avoid these problems, in particular, adding the following lines to /etc/libvirt/qemu.conf:</div>
<div><br></div><div>----8<--------</div><div><div>user = "oneadmin"</div><div>group = "oneadmin"</div><div>dynamic_ownership = 0</div></div><div>---->8--------</div><div><br></div><div>We've opened a ticket to deal with this issue: <a href="http://dev.opennebula.org/issues/1034">http://dev.opennebula.org/issues/1034</a></div>
<div><br></div><div>Thanks for reporting this.</div><div><br></div><div>Cheers,</div><div>Jaime</div><div><br><div class="gmail_quote">On Sun, Dec 11, 2011 at 1:48 PM, richard -rw- weinberger <span dir="ltr"><<a href="mailto:richard.weinberger@gmail.com">richard.weinberger@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
While reviewing OpenNebula's source (3.0.0) I found some craziness.<br>
It seems to create world writable files and directories.<br>
<br>
tm_mad/shared/tm_ln.sh:42:exec_and_log "chmod a+w $DST_DIR"<br>
tm_mad/shared/tm_mkimage.sh:45:exec_and_log "chmod a+rw $DST_PATH"<br>
tm_mad/shared/tm_clone.sh:44:exec_and_log "chmod a+w $DST_DIR"<br>
tm_mad/shared/tm_clone.sh:60:exec_and_log "chmod a+rw $DST_PATH"<br>
tm_mad/shared/tm_mkswap.sh:40:exec_and_log "chmod a+w $DST_DIR"<br>
tm_mad/shared/tm_mkswap.sh:50:exec_and_log "chmod a+w $DST_PATH"<br>
tm_mad/lvm/tm_mkimage.sh:38:exec_and_log "$SSH $DST_HOST chmod a+rw $DST_PATH"<br>
tm_mad/lvm/tm_mkswap.sh:42:exec_and_log "$SSH $DST_HOST chmod a+w $DST_PATH"<br>
tm_mad/ssh/tm_mkimage.sh:41:exec_and_log "$SSH $DST_HOST chmod a+rw $DST_PATH"<br>
tm_mad/ssh/tm_clone.sh:60:exec_and_log "$SSH $DST_HOST chmod a+rw $DST_PATH"<br>
tm_mad/ssh/tm_mkswap.sh:44:exec_and_log "$SSH $DST_HOST chmod a+w $DST_PATH"<br>
vm/VirtualMachine.cc:154: chmod(oss.str().c_str(), 0777);<br>
vm/VirtualMachine.cc:153: mkdir(oss.str().c_str(), 0777);<br>
vmm_mad/remotes/kvm/save:27: chmod 666 $file<br>
<br>
This has to get fixed, it's security risk!<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Thanks,<br>
//richard<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a><br>
</div>