I have a file in MacOS that I want to change that is protected by permission restrictions. I cannot access it with my normal account. I use terminal to log in to root, and try to open the file as such:
open -a "TextEdit.app" file
However, the terminal returns the following error:
LSOpenURLsWithRole() failed for the application /Applications/TextEdit.app with
error -10810 for the file ...
The open command works for my normal user account on files, but when terminal is logged into root, the command returns this error.
I have looked at many articles, but none seem to solve the problem.
Thanks for any help.
root
can't run the GUI and TextEdit is a GUI app.sudo open
while logged in as a normal (well, admin) user doesn't do anything useful, because whileopen
runs as root, the app it opens will be running as the normal user and not have root privs.