Truenas rebalancing script gives operation not permitted error

After adding 2 new drives as a mirror to an existing pool, i tried the rebalancing script here however when i try to run command it creates a .balance file and then gives operation not permitted error. According to my researches i found out this happens when you have a smb permission and i have it in those partitions. I tried to smb service but didnt work out. What should i do?

PS: i run the script as root

Here is what the error looks like