-
Notifications
You must be signed in to change notification settings - Fork 3
Add your questions here, we will answer them quickly
You should check various logs and fill an issue trough github or contact us on our mailing list if your still stuck:
- To enable apache logs, add this line in your virtualhost :
ErrorLog /var/log/filez/fz-error.log
an reload it - For PHP, edit your php.ini
error_log = /tmp/php-error.log
and reloat your http server. You can also set "display_errors=On" in your php.ini. - Filez errors aren't displayed by default, to enable them, add
debug=true
under the[app]
section of filez.ini. All errors will be written in filez log directory.
It means Apache rewrite module isn't correctly configured. 4 possibilities :
- the ".htaccess" file is missing
- apache rewrite module isn't installed.
- apache rewrite module isn't loaded. As root, type this in a terminal
a2enmod rewrite
- Apache disallow your .htaccess rules. Edit your virtual host (/etc/apache2/sites-available) and replace
AllowOverride None
byAllowOverride All
.
Dont forget to reload apache after editing its configuration.
Example : Only allow users with "mailenable" = "OK" (for OpenLDAP)
Edit 'config/filez.ini'
[user_factory_options]
accountFilterFormat=”(&(objectClass=posixAccount)(uid=%s)(mailenable=OK))”
You should also check the configuration of the "accountFilterFormat" option in the Zend Framework documentation.
- For a new language (German for example) : first make a copy the 'fr' folder in 'i18n/' and name it 'de'.
- Edit the file 'i18n/de/LC_MESSAGES/default.po' with poEdit.
- Don't forget to set your browser to request 'de' as your main language to view your changes.
- Share your work with the FileZ team on the mailing list, github issues or your git fork.
- Thanks a lot for contributing !
Copy the file 'scripts/cron.sh' as 'scripts/my_cron.sh' to prevent future updates from overwriting your configuration. Open your new file and edit the LOG_DIR, URL and LANG variables to suit your need. Finally, add this script to your cron tasks.
Edit the "https" options in the "app" section of your filez.ini with one of the following value :
- "off"
- "login_only"
- "always"
Don't set "upload_dir" to /path/to/filezweb/upload"
Example of configuration in your filez.ini :
[user_factory_options]
baseDn = "ou=people,dc=univ-avignon,dc=fr"
host = ad.univ-avignon.fr
bindRequiresDn = "false"
accountDomainName = "domain.local"
username = "cn=compte_apache,cn=Users,dc=domain,dc=local" ; mandatory
password = "pwd" ; mandatory
; other options are described here : http://framework.zend.com/manual/fr/zend.ldap.api.html
[user_attributes_translation]
firstname = "givenname"
lastname = "sn"
email = "mail"
id = "samaccountname"
To only allow members from a certain group:
[user_factory_options]
accountFilterFormat = "(&(&(objectClass=user)(sAMAccountName=%s))(memberOf=cn=filez,ou=groups,dc=univ-avignon,dc=fr))"
If you want to manage your users in your database (and not through any LDAP server), you'll have to manually create a database-table holding your users.
Create a table
CREATE TABLE `fz_user` (
`id` SERIAL NOT NULL ,
`username` VARCHAR( 30 ) NOT NULL ,
`password` VARCHAR( 40 ) NOT NULL ,
`salt` VARCHAR( 40 ),
`firstname` VARCHAR( 50 ) NOT NULL ,
`lastname` VARCHAR( 50 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
`is_admin` BOOLEAN DEFAULT 0,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = MYISAM ;
Edit filez.ini
[app]
auth_handler_class = Fz_Controller_Security_Internal
user_factory_class = Fz_User_Factory_Database
...
[user_factory_options]
db_use_global_conf = true
db_table = fz_user
db_password_field = password
db_username_field = username
db_password_algorithm = SHA1
[user_attributes_translation]
firstname = firstname
lastname = lastname
email = email
id = username
db_password_algorithm
describe the method used to encrypt the password. There is several possible values that should suit your needs :
- "MD5"
- "SHA1"
- PHP Function name ex:
methodName
- PHP Static method ex:
ClassName::Method
- Plain SQL ex:
SHA1(CONCAT(salt, :password))
If you use a PHP callback, just put the file containing your function under the 'lib/' directory.
Note : FileZ doesn't have an administrative backend to create new user yet, You will need to create the them manually with the following SQL command :
INSERT INTO fz_user (`username`, `password`, `firstname`, `lastname`, `email`, `is_admin`)
VALUES ('foobar', SHA1('yourpassword'), 'Foo', 'Bar', 'foo@bar.com', 1);