fixed bug: chown will be applied on correct path