Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CACHEDIR.TAG file to tmp/ #13653

Merged
merged 1 commit into from Jan 22, 2019

Conversation

literalplus
Copy link
Contributor

@literalplus literalplus commented Oct 29, 2018

Ellipsis

This PR adds a simple CACHEDIR.TAG file, as recognised by some backup solutions. This originated in issue #12754, which I assume is accepting PRs.

Note that I have modified the URL: The original http://www.brynosaurus.com/cachedir/ is now showing an error page (blocked by Yale for malware?), but http://www.bford.info/cachedir/ seems to be an alias.

Caveats

This assumes that users would not just go and delete the entire tmp/ directory. A periodic check for the CACHEDIR.TAG would fix this, but I wasn't sure where to put it in the code. It's probably not something we want to do at every request. Also, this might be considered unnecessary overhead for most use cases. It might be sensible to assume that users relying on this file would take care, but I don't think that is a very safe assumption to make.

It could also be considered to include a check for CACHEDIR.TAG in the System Check page, but again, only very few users will probably care about that.

This PR does not add any tests because it does not add any code.

Fixes #12754

Note that this does not handle cases where users delete the whole tmp/
directory. However, it is to be expected that users depending on
that file would take care not to delete it.

Fixes matomo-org#12754
@Findus23 Findus23 added Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. Needs Review PRs that need a code review labels Oct 29, 2018
@mattab mattab added this to the 3.9.0 milestone Nov 14, 2018
@mattab
Copy link
Member

mattab commented Nov 14, 2018

Thank you for the PR @xxyy
Could anyone maybe confirm this is confirmed as working (cc @Findus23 ) ?

@diosmosis
Copy link
Member

Tested with borgbackup locally, works w/ the --exclude-caches option. Thanks @xxyy for the first contribution!

@diosmosis diosmosis merged commit a46e61c into matomo-org:3.x-dev Jan 22, 2019
@mattab mattab modified the milestones: 3.9.0, 3.8.1 Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CACHEDIR.TAG tag file in tmp/
4 participants