Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Simple file permissions control

Josh Schmidt edited this page Oct 30, 2012 · 1 revision

TODO describe more how locked and hidden works

Assign an attributes array inside the specific mounted driver you would like to set the permissions for.

Example:

<?php
array(
	'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
	'path'   => 'path/to/files',   // path to files (REQUIRED)
	'attributes' => array(
		array(
			'pattern' => '/^TEST$/', //You can also set permissions for file types by adding, for example, .jpg inside pattern.
			'read'    => false,
			'write'   => false,
			'locked'  => true
		)
	)
),

You can set the following true/false to the attributes:

'read'   => true/false,
'write'  => true/false,
'locked' => true/false,
'hidden' => true/false

Discussion: https://github.com/Studio-42/elFinder/issues/98#issuecomment-1866553