Merge pull request #7352 from open-sausages/pulls/4.0/safer-perms

DOCS Update documentation / upgrading for file permissions
This commit is contained in:
Chris Joe 2017-09-08 12:27:01 +12:00 committed by GitHub
commit a764488403
2 changed files with 37 additions and 1 deletions

View File

@ -82,7 +82,35 @@ needs to create/have write-access to:
* The main installation directory (for creating .htaccess file and assets directory)
* The mysite folder (to create _config.php)
* After the install, the assets directory is the only directory that needs write access.
* Image thumbnails will not show in the CMS if permission is not given
* Image thumbnails will not show in the CMS if permission is not given
If you are running on a server instance where users other than the webserver user will need
read / write access to files in the assets folder, then you will need to adjust the
permissions of the filesystem to a more permissive setting.
By default private files and `.htaccess` are written with permission `0600`.
You could enable other users to access these files with the below config.
Note: Please adjust the values below to those appropriate for your server configuration:
*mysite/_config/assetperms.yml*
```yaml
---
Name: myassetperms
---
SilverStripe\Assets\Flysystem\AssetAdapter:
file_permissions:
file:
public: 0644
private: 0644
dir:
public: 0755
private: 0755
```
For more information on understanding and determining file permissions, please see
[wikipedia](https://en.wikipedia.org/wiki/File_system_permissions#Traditional_Unix_permissions)
on unix permissions.
## I have whitespace before my HTML output, triggering quirks mode or preventing cookies from being set

View File

@ -808,6 +808,10 @@ SilverStripe\Filesystem\Flysystem\FlysystemAssetStore:
See our ["File Management" guide](/developer_guides/files/file_management) for more information.
Depending on your server configuration, it may also be necessary to adjust your assets folder
permissions. Please see the [common installation problems](/getting_started/installation/common_problems)
guide for configuration instruction.
#### Migrating File DataObject from 3.x to 4.0
Since the structure of `File` dataobjects has changed, a new task `MigrateFileTask` has been added to assist
@ -1171,6 +1175,10 @@ standard SilverStripe templates on flush. These templates include:
You will need to make sure that these files are writable via the web server, and that any necessary
configuration customisation is done via overriding these templates.
Depending on your server configuration, it may also be necessary to adjust your assets folder
permissions. Please see the [common installation problems](/getting_started/installation/common_problems)
guide for configuration instruction.
If upgrading from an existing installation, make sure to invoke `?flush=all` at least once.
See our ["File Security" guide](/developer_guides/files/file_security) for more information.