title: How to Run Systemd Service file with root access in Ubuntu 16.04
body: <p>I am having a service file for mongodb at   /lib/systemd/system/mongod.service</p>
  
  <p>and my file contains following data as below</p>
  
  <pre><code>[Unit]
  Description=High-performance, schema-free document-oriented database
  After=network.target
  Documentation=https://docs.mongodb.org/manual
  
  [Service]
  User=mongodb
  Group=mongodb
  ExecStart=/usr/bin/mongod --quiet --fork --config /etc/mongod.conf
  # file size
  LimitFSIZE=infinity
  # cpu time
  LimitCPU=infinity
  # virtual memory size
  LimitAS=infinity
  # open files
  LimitNOFILE=64000
  # processes/threads
  LimitNPROC=64000
  # total threads (user+kernel)
  TasksMax=infinity
  TasksAccounting=false
  
  # Recommended limits for for mongod as specified in
  # http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>So while Running the Command as below </p>
  
  <pre><code>sudo /usr/bin/mongod --quiet --fork --config /etc/mongod.conf
  </code></pre>
  
  <p>my command running successfully but coming to Service File it is getting Error due to No Root Access.</p>
  
  <p>So i want to run my systemd service file as root access.Any Suggestion would be appreciated and thanks in advance</p>