Fix chown to use www-data directly
Export variables to allow their use in the app