Home

Lullabot

Lullabot Ideas

We know stuff. We empower you to know stuff too.

Drupal Module Development Deep Dive Week

London, UK
September 20-24, 2010

Solving the permission denied error when updating Drupal via CVS

Article by John VanDykOctober 22, 2008 - 10:35am

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 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/
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 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
$ 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/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."

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

Geoff Gevalt (not verified) on October 28, 2008 - 6:27pm

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

November 20, 2008 - 4:44pm John VanDyk

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!

big_ben3333 (not verified) on November 3, 2008 - 9:33am

Thanks

Thanks,

It solve my problem.

Aidid (not verified) on April 22, 2009 - 10:02am

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?

About this 'bot

John VanDyk

John has left Lullabot and is now working at Iowa State University where he leads Drupal development projects as a systems analyst and adjunct assistant professor.

Before encountering Drupal, John was a developer in the Userland Frontier® community and worked with object databases. John was intrigued by the world-wide web at its inception and has been building websites with better and better...

more

Recent

Drupal Voices 160: Moshe Weitzman on Page Rendering in Drupal 7

Podcast 9.02.2010

Drupal Voices 159: John Albin Wilkins on Drupal 7 Theming

Podcast 9.01.2010

Drupal Voices 158: Emma Jane Hogbin on PHP for Designers

Podcast 8.31.2010

Command Line Basics: More Editing with Vi/Vim

Video 8.31.2010

Lullabot's Back to School Sale

Blog 8.30.2010

Popular

Drupal Voices 160: Moshe Weitzman on Page Rendering in Drupal 7

Podcast 9.02.2010

Photo galleries with Views Attach

Article 6.01.2009

Drupal Voices 159: John Albin Wilkins on Drupal 7 Theming

Podcast 9.01.2010

Announcing BeautyTips, a jQuery Tooltip Plugin

Article 10.20.2008

Install a Local Web Server on Ubuntu

Video 11.14.2007
 
  • Home
  • Services
  • Events
  • Ideas
  • Store

Connect the Bots:

Twitter Facebook YouTube blip.tv All Posts Newsletter
  • Ideas
  • Blog
  • Podcasts
  • Videos
  • About
  • Contact
  • Jobs
  • Services
    • Training
  • Events
    • Training Workshops
    • Other Events
    • Conferences
    • Calendar
  • Products
    • Videos
    • Books
    • Swag
  • Ideas
    • Blog
    • Podcast
    • Videos
  • About
    • Philosophy
    • Team
    • Presskit
  • Contact
    • General
    • Work Inquiries
    • Mailing List