0

I have issues setting file system (private) for users as described here. I wonder what they ment by

"This setting is used as the preferred download method. The use of public files is more efficient, but does not provide any access control."

If i want let only user that uploaded file have access to the file, which setting should i choose, and what are drawbacks?

Moreover, could if i choose private system, could i control access by module (for exaple User relationships module, so the friends of user could download the file)

Thanks.

1 Answer 1

1

Private filesystem allows Drupal to run permission checks before serving the requested file.

If you are using public file system, direct links to your files will be accessible to anyone, no matter they are logged in users or anonymous.

Regarding your questions:

If i want let only user that uploaded file have access to the file, which setting should i choose, and what are drawbacks?

You should choose private filesystem. Drawbacks are explained above.

Moreover, could if i choose private system, could i control access by module (for exaple User relationships module, so the friends of user could download the file)

Check out hook_file_download() - you can use it in a custom module to perform custom access checks.

Also, see this thread.

2
  • Thanks. Does turning on private filesystem have any performance and/or other implications on files that are not in private folder ?
    – NenadP
    Jan 14, 2013 at 17:03
  • No, it should not have any effect on the public files. Jan 14, 2013 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.