When testing a script in the Repository Manager, the script source window displays only:
# You do not own this file. Your admin has changed the configuration settings # to prevent non-owners from viewing the R code of files they don't own. You # may still define Quick Inputs, run tests, and explore artifacts.
This is not due to ownership or permissions as the error indicates. It is due to a bug (RW-462) in DeployR 7.0 and 7.1.
Upgrade DeployR to version 7.2.