Here is the link where these two commands are written.
http://docs.moodle.org/25/en/Installing_Moodle
Go to the section "Create the (moodledata) data directory" on that document.
are those commands valid in Linux/Ubuntu?
My inverstigation says than +a mode for chmod is available for Mac OS. So I want to ask from experts whether linux/ubuntu have analogs of these two commands?

for having the same (or near same) permissions in /moodledata first you should change the owner, the group and then set the permissions (it worked for me using moodle 2.7 from git on centos 6.6), given moodledata IS empty!