sudo mate no longer possible?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

sudo mate no longer possible?

Ben Ubois
Hello,

I'm running TextMate version 2.0-rc.27.

It seems that I'm no longer able to edit files that are not owned by
me by using `sudo mate` or plain `mate`.

Steps:

1. Run `sudo mate /etc/hosts`
2. Enter my username and password in the terminal
3. Make a change
4. Save the file

Expected: The file is saved with the new contents

Actual: an error modal is show with the following contents:

Title: The document “hosts” could not be saved.

Body: Failed replacing hosts with
/var/folders/w8/0pc0dw1d4zd9knf_qm4ls1bc0000gn/T/TemporaryItems/(A
Document Being Saved By TextMate)/hosts: You don’t have permission to
save the file “hosts” in the folder “etc”.

So far I have tried:
- Granting "Full Disk Access" to TextMate in System Preferences ->
Security & Privacy -> Privacy
- Uninstalling and reinstalling `mate`

Please let me know if there's any more information I can provide.

Thanks!

_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: sudo mate no longer possible?

Dr Eberhard W Lisse
Works for me.

el

On 29/07/2019 13:31, Ben Ubois wrote:

> Hello,
>
> I'm running TextMate version 2.0-rc.27.
>
> It seems that I'm no longer able to edit files that are not owned by
> me by using `sudo mate` or plain `mate`.
>
> Steps:
>
> 1. Run `sudo mate /etc/hosts`
> 2. Enter my username and password in the terminal
> 3. Make a change
> 4. Save the file
>
> Expected: The file is saved with the new contents
>
> Actual: an error modal is show with the following contents:
>
> Title: The document “hosts” could not be saved.
>
> Body: Failed replacing hosts with
> /var/folders/w8/0pc0dw1d4zd9knf_qm4ls1bc0000gn/T/TemporaryItems/(A
> Document Being Saved By TextMate)/hosts: You don’t have permission to
> save the file “hosts” in the folder “etc”.
>
> So far I have tried:
> - Granting "Full Disk Access" to TextMate in System Preferences ->
> Security & Privacy -> Privacy
> - Uninstalling and reinstalling `mate`
>
> Please let me know if there's any more information I can provide.
>
> Thanks!
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> https://lists.macromates.com/listinfo/textmate
>

--
Dr. Eberhard W. Lisse          / Obstetrician & Gynaecologist (Saar)
[hidden email]            / *     |   Telephone: +264 81 124 6733 (cell)
PO Box 8421                  /
Bachbrecht, Namibia     ;____/  

_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: sudo mate no longer possible?

Allan Odgaard-4
In reply to this post by Ben Ubois

On 29 Jul 2019, at 13:31, Ben Ubois wrote:

So far I have tried:
- Granting "Full Disk Access" to TextMate in System Preferences ->
Security & Privacy -> Privacy
- Uninstalling and reinstalling `mate`

Please let me know if there's any more information I can provide.

OS version and the output from running these lines in a terminal:

ls -l /Library/LaunchDaemons/com.macromates.auth_server.plist
ls -l /Library/PrivilegedHelperTools/com.macromates.auth_server
/Library/PrivilegedHelperTools/com.macromates.auth_server --version
sudo sqlite3 /var/db/auth.db 'SELECT * FROM rules_history WHERE rule LIKE "com.macromates.textmate%"'

After this, try re-install the privileged helper tool using this command:

sudo /Library/PrivilegedHelperTools/com.macromates.auth_server --uninstall

A new authenticated save should automatically re-install it, so try sudo mate (or regular mate) after this, to see if the issue has been solved.

Even if you do get it working, I would like the output from the above steps, as ideally the user should not need to manually re-install the helper. I assume though the auth database have lost TextMate’s policy, possibly during OS upgrade.



_______________________________________________
textmate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: sudo mate no longer possible?

Allan Odgaard-4

Ben: Any update on this?

On 1 Aug 2019, at 14:45, Allan Odgaard wrote:

On 29 Jul 2019, at 13:31, Ben Ubois wrote:

So far I have tried:
- Granting "Full Disk Access" to TextMate in System Preferences ->
Security & Privacy -> Privacy
- Uninstalling and reinstalling `mate`

Please let me know if there's any more information I can provide.

OS version and the output from running these lines in a terminal:

ls -l /Library/LaunchDaemons/com.macromates.auth_server.plist
ls -l /Library/PrivilegedHelperTools/com.macromates.auth_server
/Library/PrivilegedHelperTools/com.macromates.auth_server --version
sudo sqlite3 /var/db/auth.db 'SELECT * FROM rules_history WHERE rule LIKE "com.macromates.textmate%"'

After this, try re-install the privileged helper tool using this command:

sudo /Library/PrivilegedHelperTools/com.macromates.auth_server --uninstall

A new authenticated save should automatically re-install it, so try sudo mate (or regular mate) after this, to see if the issue has been solved.

Even if you do get it working, I would like the output from the above steps, as ideally the user should not need to manually re-install the helper. I assume though the auth database have lost TextMate’s policy, possibly during OS upgrade.



_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate