Want to get Lullabot article, videocast, and podcast announcements delivered right to your in-box?
Let us know your email address (we won't share it) and we'll let you know when anything exciting happens.
Solving the permission denied error when updating Drupal via CVS
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:
...
cvs update: Updating scripts
cvs update: Updating sites
cvs update: Updating sites/all
cvs update: Updating sites/default
P sites/default/default.settings.php
cvs [update aborted]: cannot open .new.oxI8ko: Permission deniedThe 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/
total 0
drwxr-xr-x 6 jvandyk staff 204 Oct 22 10:07 CVS
drwxr-xr-x 4 jvandyk staff 136 Oct 22 09:18 all
dr-xr-xr-x 6 jvandyk staff 204 Oct 22 09:20 defaultSo 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
$ cvs update -dP -r DRUPAL-6-5
...
cvs update: Updating scripts
cvs update: Updating sites
cvs update: Updating sites/all
U sites/all/README.txt
cvs update: Updating sites/default
U sites/default/default.settings.php
cvs update: Updating themes
...
[cvs proceeds with no errors]
$ chmod u-w sites/defaultThe 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."
You'll also want to take a look at sites/default/default.settings.php if it's been updated by cvs, because those changes will not automatically be put into your existing sites/default/settings.php file.
Comments on this post will automatically be closed three months from the original post date.



RSS Feed



Comments
Interesting...
John,
Hope all is well...
I confess that I am still confused about how to do the initial CVS updates via command line.... In other words, this is a step two or three and I'm still looking for the step 1. As you know I know how to update via PC and tortoise, but doing it with a live site from server is another matter....
Do you have some instructions here on updating a site live using CVS (all Drupal and module files and folders were initially moved over by sftp.... now want to just update existing material via CVS)
tnx
g
Updating
The best I can do is to point you to pages 491-498 in Pro Drupal Development where it walks you through some background information about what CVS is and how to use it at the command line. CVS is not easy to understand, and playing around with it on your own local box is strongly recommended!
Thanks
Thanks,
It solve my problem.
CVS
I have been having a problem about CVS anytime I do tired to checkout a project it gives me an error that says Permission denied. how I can remove and have an access or Permission?