title: Executing Shell script file from C#
body: <p>I have a shell script file in Fedora named <strong>run.sh</strong>. I would like to know when I execute this file from C# code will that file be executed as a root with superuser privileges ? As far as I understand we provide password and only then we are root user.</p>
  
  <p>Method which executes the file run.sh is as below:</p>
  
  <pre><code>private String runCron()
  {                       
      ProcessStartInfo ps = new ProcessStartInfo ();
      ps.FileName = "/home/kc/test/run.sh";
      ps.UseShellExecute = false;
      ps.RedirectStandardOutput = true;
  
      Process process = Process.Start (ps);
      process.WaitForExit ();
      return "Success";
  }
  </code></pre>