Well, i promised i would return when I discovered the problem, and here am I.
The problem was in the temp folder configuration in joomla. The folder name must be complete, including the name of some server directories, which i didn't have.
In my case, the setup folder was:
mysite/www/tmp
When the correct is:
/home/mysite/www/tmp
If other users come across this problem, you can see the folder prefix by entering in the system info of joomla. Go to PHP information and look for open_basedir variable. In this variable, you'll see something like this:
/home/yoursite/:/tmp:/usr/local/lib/php:./
Notice that the initial address is before the first : sign. Use it as your base dir directory when setting tmp variable.