Link to home
Start Free TrialLog in
Avatar of Firemedic41
Firemedic41

asked on

Need help with Drupal install

We had a user here who installed our Drupal CMS, and today when the user account was removed it apparently took the Drupal install with it, as our site went down and only gave a file listing afterwards.  We're a small fire department, and very few IT-capable folks.  I'm barely competent on Linux honestly, but can make my way through some of it.  

What I've done so far is re-downloaded Drupal, and extracted it.  I'm hoping that our site will still be in the DB, but without the CMS I can't tell.  Regardless, the new install tells me that the settings.php isn't writable.  I've made it as writable as I possibly can, and I'm not sure where to go from here.  The default sites is 755, and settings.php is 655 as it's indicated as needed.  I've changed the ownership and group to "www" for damn near everything, and still can't get the install to progress.  

Help??
Avatar of oliverpolden
oliverpolden
Flag of United Kingdom of Great Britain and Northern Ireland image

You most likely can't just download another copy of Drupal because of and additional modules, themes and files that have been added.

Do you have a backup of the database from before deleting the user? If so, restoring that should fix your site. It may be that user "1" is required in which case you could manually add a user 1 back into the users table in the database. Easiest way is to copy another user and change the email, id and username.

In what way did deleting the user "take the site with it"? What exactly do you see? Are there any errors? Have you checked the Apache error logs?: /var/log/apache/ <something.error.log> you can use the command: tail -f <file name>

Reload the page when you've run that command and you should see errors come up.
Avatar of Firemedic41
Firemedic41

ASKER

It looks like any file that may have had that users name on it is now gone.  

We do have the core Drupal files from a git repository, but don't have the settings.php file or anything else.  I doubt that a database backup is there.  Trying to tackle one issue at a time, although I do realize that they are all intertwined.  I need somewhere to start.

When I loaded back the core files from the repository, it still brings me back to the Drupal install screen.
Actually reset all of the permissions on the files and directories requested to 777, and just got it done.  Not the best way, but definitely got me to the next place.  Was able to log in with root user in MySql and reset the password for the drupal account, and the install progressed back to the point where it said it had a pre-existing install and if I would liek to just view my site.  I did that, and the site is back up and working fine.  So far so good.

What's interesting is that it looks like whenever it couldn't remove a file that was associated with that user, it created a user number to place the ownership under.  So there's been a mix of chown, chgrp, and chmod to make everything work again.
So there's been a mix of chown, chgrp, and chmod to make everything work again.
\

You likely just needed to add -R to your chown or chgrp to recursively apply ownership.

chown -R NEW_USER:NEWGROUP Drupal_User_Folder

Do you have backups?  The simplest thing to do is to recover the user's files from Backup, if it's been deleted.  It does sound like you only deleted the user account without deleting the user contents, since a typical user deletion on Linux shouldn't be deleting the user contents, just the user entry from /etc/passwd and the password hash from /etc/shadow
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.