Folder created in terminal does not give access to control panel user [closed]

Three options:

  1. Run the command as the target user, not as root.

    sudo -u softs4939 mkdir /home/example.com/website/
    
  2. run chown afterwards

    mkdir /home/example.com/website/
    chown softs4939:softs4939 /home/example.com/website/
    
  3. use install

    install -o softs4939 -g softs4939 -d /home/example.com/website/
    

Personally, I prefer option 3 in such scripts.