Recent Drupal tricks and tips...

By donmc, 28 December, 2013
Topic
Found lots of bocked (SPAM) users in my Drupal 7 site. Deleted with this SQL script (in PHPMYADMIN)
DELETE FROM users WHERE `status` = 0 AND `uid` != 0; Also had 49,000+ failed admin login attempts on my site - had caused a lockout of my admin user.
Did this in phpmyadmin : DELETE FROM flood;
Also these bash script commands to set the permissions for a standard Drupal site: cd /path_to_drupal_installation sudo chown -R greg:www-data . find . -type d -exec chmod u=rwx,g=rx,o= '{}' \; find . -type f -exec chmod u=rw,g=r,o= '{}' \; and... cd /path_to_drupal_installation/sites find . -type d -name files -exec chmod ug=rwx,o= '{}' \; for d in ./*/files do find $d -type d -exec chmod ug=rwx,o= '{}' \; find $d -type f -exec chmod ug=rw,o= '{}' \; done