I am trying to figure out a clean way to do this in drupal 7 but can't find a clean way.
Problem: A user needs to be able to download files without the need to upload any files. Files are placed in private dir or uploaded by admin.
Scenario: A file will be placed in /private/userx directory by non-drupal way (cp file), a user needs access to download the files in own dir?
Requirements: 1. A user doesn't upload files. 2. A user can download his subdir files only. 3. A user can't download other users files.
I searched for solution but none found. I tried EntityForm file but that requires user upload and admin can't upload for a user as per other discussions.
One option is to place the file in a private dir and insert file object in the database with userid, but couldn't find example how to do that.
Any insight will be great help.