User login

Drupal World

Stay up-to-date with news on Drupal from around the net.

Solving the permission denied error when updating Drupal via CVS

22
Wednesday, October 22, 2008

If you update Drupal via cvs by doing the following kind of command (here I am updating a Drupal 6.4 installation to Drupal 6.5):
$ cvs update -dP -r DRUPAL-6-5
you might run into the following error:
...<br />cvs update: Updating scripts<br />cvs update: Updating sites<br />cvs update: Updating sites/all<br />cvs update: Updating sites/default<br />P sites/default/default.settings.php<br />cvs [update aborted]: cannot open .new.oxI8ko: Permission denied
The update is aborting because the cvs program does not have permission to create a temporary file in the sites/default directory of your Drupal installation. Notice there's no "w" in the permissions for the "default" directory:
$ ls -l sites/<br />total 0<br />drwxr-xr-x&nbsp; 6 jvandyk&nbsp; staff&nbsp; 204 Oct 22 10:07 CVS<br />drwxr-xr-x&nbsp; 4 jvandyk&nbsp; staff&nbsp; 136 Oct 22 09:18 all<br />dr-xr-xr-x&nbsp; 6 jvandyk&nbsp; staff&nbsp; 204 Oct 22 09:20 default
So the solution is to give write access temporarily to the user running cvs, then take it away again after the update:
$ chmod u+w sites/default<br />$ cvs update -dP -r DRUPAL-6-5<br />...<br />cvs update: Updating scripts<br />cvs update: Updating sites<br />cvs update: Updating sites/all<br />U sites/all/README.txt<br />cvs update: Updating sites/default<br />U sites/default/default.settings.php<br />cvs update: Updating themes<br />...<br />[cvs proceeds with no errors]<br />$ chmod u-w sites/default
The chmod u+w command means "give the user who owns this file write permission" and chmod u-w means "take write permission away from the user who owns the file."
read more

Comments (0)

No comments have been posted yet, why not be the first??
Login or register to post comments