Hey guys, I use textmate a LOT on OS-X Leopard 1.5.6 as my main CLI text editor via .bash_profile and I edit a lot of files from my computer with textmate. But I have issues with permissions when trying to "mate" files which my user does not have permissions to read. Even if I "sudo mate". Textmate pretends it opened this file but the file is empty, and when you save it it will ask for administrative privileges to do so.
Steps to reproduce: $ echo "this is a test" > testfile $ sudo chown root testfile $ sudo chmod 700 testfile $ sudo mate testfile
Result: Textmate opens a window called "testfile" but shows nothing in this file. If you edit this file and hit save, a window pops up which asks for your credentials to save over this file.
Expected result: #1 - preferred: uses the above "sudo" permission to pass into and/or launch textmate under for editing of this file. Which would allow opening and saving of this file without requiring re-entry of credentials (annoying). #2 - secondary/temporary alternative: upon failing opening a file (like what's happening here) asking the user for credentials which would allow opening the file. If this fails, do not open the window because clearly, you don't have permissions for this file anyway, you shouldn't have an editor window open for it. If their credentials succeed, use the "open" permission for saving also.
Anyone have a workaround for this, or any ideas? The contact area said to post here first. I googled a bit and didn't find anything so I'm starting here.
Cheers!
- Andrew