How I can management private files My default download method is public, but I need save some file on private folder, I am doing this:

//...
$file = file_save_data($handle, 'private://example.zip', FILE_EXISTS_REPLACE);
//...


Now when I try show to download it:

//...
$file = file_load($file_fid);
$url = file_create_url($file-&gt;uri);

$output['download'] = [
  '#type' =&gt; 'markup',
  '#markup' =&gt; l(t('Download'), $url),
];

return $output;
//...


If I do click on the url, I get:


  Access denied. You are not authorized to access this page.


I am superadmin (uid = 1). How I can management those files for me and for others users?
For bypass Drupal permission, you can implements hook_file_download():

/**
 * Implements hook_file_download().
 */
function mymodule_file_download($uri) {
  if (someCondition()) {
    if (!user_access('some permissions')) {
      // Access to the file is denied.
      return -1;
    }
    else {
      return array('Content-Type' =&gt; file_get_mimetype($uri));
    }
  }
}