src: added chmod (works with both symbolic and octal modes)