Back to top


Denver (all Colorado) Drupal User Group

If you are a Drupal user or developer in Denver, Boulder, Colorado Springs, or maybe Durango you should consider joining up with the Groups.Drupal.Org group site for Denver. The group really covers more of Colorado than just Denver, but Denver is likely to be the home for many of the meetings.

People Involved: 

Drupal Fun at the Shell

So, if you have Drupal installed and maybe even configured and now you're saying hey, what database do all of my installations use? Are my settings files secure?

Well, you already know that I love DreamHost because of the shell access and why?

Well, fun stuff like this!

Drupal's Scripts

There's a few fun examples in the base directory of your drupal install in the scripts folder. will get rid of backup files and clean up the code. There are also examples of scripts to use to call the site's cron script (you are doing that, aren't you? here's why you should) Lots of fun examples in that scripts directory.

A little database security

Let's say you have a bucket of domains hosted on the same account so they are all in the same home directory and you just realized that your settings.php files are readable by other people with shell access (permissions of 644) which is necessary on many shared hosting accounts because of the way they run PHP, but not necessary on DreamHost using php running as your user. If someone has the information in your settings.php file, they could get into your mysql database with some decent privileges. Yikes! So, just use this one liner to find those files, and chmod them down to something more reasonable like 600.

Find the files and list the permissions:

find ./ -name 'settings.php' -exec ls -l {} \;

And then to tighten down those permissions:

find ./ -name 'settings.php' -exec chmod 600 {} \;

Great! Security, and only one line of commands.

To break down what's happening in that line, I use the find command to find files. ./ is expanded by the shell to look for anything in the form {stuff}.{stuff} such as "" so that it looks in all the directories that correspond to domains. I have lots of other directories in my home folder, but I know I don't need to search those so I don't want to waste my computer's time. Next, I use the -name flag to only look for the file called "settings.php". Fair enough. Then, I use the "exec" command to call chmod.

People Involved: 

remove "not verified" from comments

Note: this is a really bad way to do this - see the comments for the right way.

I disagree on this point, but a friend asked and other folks have previously been confused so I removed the "not verified" label from a site and I was confused on where to do it. A little bit of grepping and I found it's in

@@ -898,7 +899,8 @@
$output = $object->name;

People Involved: 


Subscribe to RSS - Drupal