18.10.2016 Views

Drupal 7 Module Development

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 11<br />

It is very important that private files live outside of <strong>Drupal</strong>'s web root,<br />

despite the fact that by default they do not. In order for private files to<br />

be useful, they must be readable to the user your web server runs as.<br />

However, if these files are then under <strong>Drupal</strong>'s web root, they will be<br />

readable to anybody. Proper testing is extremely important for properly<br />

securing private files. For more information on how to properly secure<br />

your private file system, see the following site:<br />

http://drupal.org/node/344806<br />

Temporary file storage is typically only used by <strong>Drupal</strong> for internal operations.<br />

When files are first saved by <strong>Drupal</strong>, they are first written into the temporary file<br />

area so they can be checked for security issues. After they have been deemed safe,<br />

they are written to their final location.<br />

Each of the directories in the preceding error message reflects the default location<br />

for each type of file. You can change these default locations after your installation is<br />

complete by logging in as administrator and visiting admin/config/media/filesystem<br />

as seen in the following image:<br />

You can also indicate whether the default download method should be public or<br />

private. (After installation it is public.)<br />

[ 315 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!