I'm very new to Ubuntu and I set up a website (mybb forum) by creating a user called webmaster then installing LAMP etc and the website folder was var/www/html.

Anyways everything worked well until I encountered an SQL error (file not found) after I changed permissions by only allowing root to access ssh.

I don't know exactly the problem but I do know what I want.

I need help to delete ALL previous LAMP installation, including its configurations, and clear up the /var/www/html since I don't know what need to be deleted there.

Also need to reset any relevant configurations to my website if the uninstall/install doesn't do it.

Do you advice me to create the website under root user to avoid any permission conflicts ?

Please take time to read my complicated situation and I appreciate any help, as I said I'm new and I spend days trying to fix my problems.

Thank you in advance.

  • You should do the opposite: do not allow ssh access to root. You should only access ssh via normal user, then use sudo – garakkio Jul 7 '16 at 12:09
  • I'm not sure, I did that because I'm giving out sFTP users to some people, so they don't need ssh. Also, can you tell me where/how to "not allow ssh access to root" in console ? I might need to check what I did there thanks! – MoodyW Jul 7 '16 at 12:13
  • There is an option in /etc/ssh/sshd_config – garakkio Jul 7 '16 at 15:25

It is not recommended run a webserver on root user. If you want advice move to services like amazon ecs, google cloud, where you can easily start again a new server and get support, or online help. Or at least a provider that has cpanel. This is not a thing to do by hand, contact your provider support and ask how to reset an account. (backup your database and software first) Almost anything on linux you can fix by hand, but there are things that don't compensate, like this, on my point of view.

  • I'm on a vps..so you are telling me that If I have messed up the permissions then using the root access to set the website isn't a solution ? – MoodyW Jul 7 '16 at 11:58
  • You could fix everything with root access, but you'll have to know many details and everything you broke. But hey, Isn't there a panel or something, where you could just click and reset? Many VPSs have this feature, start all over again. It is the easiest way, in my opinion. Ask for support about reseting the server. They will do something for you and spare you some headache. – Cloacker Jul 7 '16 at 12:18
  • Haha! I asked to delete all LAMP installation because, as noobs, we like resetting/deleting all when we fail. But wow, your solution is far more radical I might consider it if I can backup my other files – MoodyW Jul 7 '16 at 12:23
  • If you just want to get rid of lamp, sudo apt-get --purge remove lamp-server^ – Cloacker Jul 7 '16 at 12:30
  • it's not that simple, but I think I'll backup some files, reset the vps and restart. As this was my first experience in VPS and LINUX. Appreciate the help Thanks ! – MoodyW Jul 7 '16 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.