Procd: - ubus - failed to chown (/var/run/ubus)

I have been trying to tweak the rootfs, presently /var is a softlink of /tmp ,
I do need /var as a directory to be used as a mount point for mounting a partition
I do want the /var as seperate directory , did the below tweak , added commands just prior to
$(call Kernel/CompileImage/Initramfs) call

define Kernel/CompileImage
        $(call Kernel/CompileImage/Default)
        rm $(TARGET_DIR)/var
        mkdir -p $(TARGET_DIR)/var
        chmod 1777 $(TARGET_DIR)/var
        $(call Kernel/CompileImage/Initramfs)

Get the below error in the boot up , and device is getting hung during boot up
Console shows: "procd - early -" and afterwards below error
procd: - ubus - failed to chown (/var/run/ubus)
Getting the below error

Looking for some pointers