errores

error: unable to create temporary sha1 filename ./objects/17: Permission denied

I have had this issue recently, with a git branch which did not want to to react to push. That's what a was having:


$ git pushgit@domain.net's password Counting objects: 5, done.
Delta compression using up to 2 threads.
ng objects: 100% (3/3), done.
Writing objects: 100% (3/3), 303 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
error: unable to create temporary sha1 filename ./objects/17: Permission denied
fatal: failed to write object

error: unpack failed: unpacker exited with error code
git@domain.net:/var/www/git/domain
! [remote rejected] HEAD -> master (n/a (unpacker error))
error: failed to push some refs to 'git@server:/var/www/git/domain'

The problem is a permissions one... but it will not work if you try to update the permissions in the server folder. You have to update the permissions in the server, but in .git folder:

chown -R git:git .git/

In my case git was the user who should have the permissions to write.

Once changed, the push in your local environment should work.

categorias: 

Symfony2: warning open_basedir restriction in effect

Error al subir una aplicación al sevidor en el que va a estar en producción:

symfony ErrorException: Warning: file_exists(): open_basedir restriction in effect

Después de estrujarme mucho los sesos, hize un

rm -rf app/cache/* 

y "evoilá" :-).

Después pueden salir algunos errores como:

UnexpectedValueException: The stream or file "/var/www/vhosts/*/app/logs/prod.log" could not be opened; it may be invalid or not writable.

lo que simplemente se arregla corrigiendo con los permisos adecuados los directorios que nos indique el propio mensaje, en este caso el directorio de logs:

chmod a+rw -R logs/