I installed mariadb, nginx, php7.2-fpm, ufw, fail2ban, zip and unzip as a root in the past. My site is WordPress.

Now I have added an user with root privilages into my server. I won't use root user anymore for security reason.

  1. I changed user:www-data; to user:newuser; in the nginx.conf
  2. I run below command to change /var/www chown value
    chown -R **newuser:newuser** /var/www/
  3. I changed php-fpm user values:
    user = newuser
    group = newuser
    listen.owner = newuser
    listen.group = newuser
  4. I changed PermitRootLogin no and restart SSH

My questions are:

  • Should I change anything in mariadb or etc?
  • chown values of /var/log folder still looks www:data. Should I change it?
  • Should I migrate Cloudflare SSL from /etc folder to /home/newuser folder? Because nginx may not see that SSL?

Anything you recommend additionally? Thank you! :)

  • do you have any idea? – Serdar Koçak Mar 11 at 19:42
  • For the first two questions, the answer is "no". For the last, if Nginx can operate normally when keeping SSL files in /etc/, then don't migrate them to any other folder. – Pothi Kalimuthu Mar 12 at 3:18
  • @PothiKalimuthu Thank you so much! I really appreciate it :) – Serdar Koçak Mar 13 at 16:34

Your Answer

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

Browse other questions tagged or ask your own question.