title: Set file permissions with Google App Script
body: <p>I regularly need to change file share permissions on large numbers of files on Google Drive.  I would rather not have to do this manually on a file by file basis.  I have no issues extracting the File IDs, but can't seem to find any information associated with setting permissions for specific users.</p>
  <p>Suppose I have a file with <code>ID - 1132asdfasdf5sdf564sdf</code>
  Suppose I have a user named <code>John Smith</code> whose email address is <code>jsmith@email.com</code> and this user is a Google user.</p>
  <p>Here's a sample script:</p>
  <pre><code>function myFunction() {      
    // this grabs the ID of the source file
    var sourcefile=DriveApp.getFileById(&quot;1132asdfasdf5sdf564sdf&quot;);      
  }
  </code></pre>
  <p>Question.  Once I grab the file by ID, is it possible to set either edit or view permissions for this specific user?</p>