Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Versioned Files - old versions are web accessible

Go to End

3 Posts   812 Views

Mike Waters

Community Member, 6 Posts

2 March 2012 at 3:52pm

Hi All

I'm new to Silverstripe and have a question about the Versioned Files module.

Old versions of files are stored under the assets directory, eg

if a file is here...


its versions are here....

I noticed that these file versions are accessible to unauthenticated site visitors.

Is there any way of hiding these from site visitors, but keeping them visible for users logged into the admin interface?

I have searched the web and forums for this with no luck so far

thanks in advance!



Community Member, 323 Posts

2 March 2012 at 9:45pm

Hi Mike.

I’ve used the secure files module for this kind of issue.

Hope it helps,

Mike Waters

Community Member, 6 Posts

8 March 2012 at 7:12pm

Edited: 08/03/2012 7:13pm

Thanks for that Juanitou

I gave Secure Files module a whirl and it doesn't seem to play nice with Versioned Files :( (or vice versa of course)

The secure files module adds access controls to Folders that are visible in the Files and Images section tree.
Unfortunately the files I need to secure are in subfolders named _versions but these are not visible in the tree so I can't apply access controls directly.

Also if I make a visible Folder secure via the Secure Files module, any version files (eg asssets/documents/_versions/123/File.1.pdf) give me 403 both in the browser and CMS.

If anyone has any suggestions about where to go from here it would be good... even if it means getting into the code.

Another option I considered was to make some manual updates to .htaccess, if anyone can point me in the direction of the "SilverStripe Way" for that kind of thing

thanks again