I need to pass some URLs to user pictures via AJAX. I can't, however, pass private://filename.jpg because client can't open it. Are there some settings to configure where I can change to public space?
You need to change the image field associated with the user profile to Public, and then you need to migrate any existing private image files to the new public directory. Here's a write-up on working with files in Drupal 7.
I think you use
file_create_url() to turn your URI into a public URL:
$path = 'private://test/test.jpg'; print file_create_url($path);
The above prints http://site.com/system/files/test/test.jpg.
This still means that visiting user should have permission to view that file (as it's a drupal private file).
If thats not true Lester Peabody's answer look good