fixing build issue and permission path for nginx