wiki:faq/drupal/sftp-permission-denied

Version 3 (modified by Jamie McClelland, 10 years ago) (diff)

--

How can I upload a file to my themes or modules directory? When I try I get an access denied message

If your Drupal installation was installed by May First/People Link, then you are using a central, shared version of the Drupal code (which means that when we update the code to fix security holes, your version is automatically updated too).

One of the side effects of this setup is that you cannot modify files in many of your web root's directories (most noticeably your themes or modules directories). When you try, you will get an Access denied message.

This restriction prevents you from editing the core Drupal code (if you could edit these files, your changes might be over-written with the next Drupal update).

Drupal has a system that allows you to make your own modification to your themes and modules directories without interfering with this core Drupal code. In your web directory, along with themes, modules, and others, there is a directory called sites. This directory is where you should put all of your customizations. The sites directory has a sub-directory called default. You can create a modules and themes directory here. Any module or theme you place in this directory will appear in your modules and themes admin pages just as if it was placed in your main modules or themes directory.

When customizing your own theme, a common approach is to:

  • Copy a theme from the central theme directory
  • Rename it after your site (so it doesn't conflict with the original them
  • Place it in your sites/default/themes directory
  • Switch your site to use your new theme
  • Customize the theme to your liking

If you are trying to add a file or folder to your sites/default directory and getting a permission denied, please see Why can't I create a file or folder in my Drupal sites/default directory?.

Attachments (3)

Download all attachments as: .zip