In my case, it worked using sudo
sudo bin/magento setup:upgrade
EDIT 19/02/16
Actually, the "sudo" solution is more a workaround for bad permissions/ownership of Magento files.
If you don't already have a Magento file system owner, create one and add it to the apache group.
adduser magento
passwd magento
//CentOS
usermod -g apache magento
//Ubuntu
usermod -g www-data magento
//restart apache
//CentOS
service httpd restart
//Ubuntu
service apache2 restart
Now that you have your user, you can set the ownership and permissions (with root or an user with sudo)
cd /var/www/html/magento2beta/magento2
find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod +x bin/magento
//CentOS
chown -R magento:apache .
//Ubuntu
chown -R magento:www-data .
Switch to the magento user
su magento
Now you should be able to run php bin/magento setup:upgrade or any other command with your magento user
bin/magento
without any arguments, and it displays actual error