something i didn't understood, suppose i write a wrapper to mate "sudo_mate" even launching TextMate like that :
sudo /Applications/TextMate/TextMate.app/Contents/MacOS/TextMate blahblah
In my experience, any time I need to edit a file I don't have access to, TextMate will realize that and authenticate me so I can save the file. This probably requires you to be in the admin group, but then so does sudo (by default), right? The only possible drawback is that new files might not get root as the owner. But maybe in that case you could just do:
i just dis a small over a file on my desktop :
~/Desktop/sudo_textmate%> ls -al -rw-rw-rw- 1 news admin 122 Nov 3 11:01 essai-sudo-config
i open it with TextMate, add "Hello world !" inside and save it.
TextMate didn't ask in authetification and the file has now those user:group :
~/Desktop/sudo_textmate%> ls -al -rw-rw-rw- 1 yvon yvon 140 Nov 3 18:16 essai-sudo-config
(yvon being my login name)
this should be considered as a bug afaik ?
TextMate would have either not open the file or ask for authentification ...
I'm usinf TextMate Version 1.5.4 (1324).
also for mate it is, in my opinion, about the same because on my box mate leaves in :
~/Desktop/sudo_textmate%> which mate /opt/local/bin/mate
where all the bins are aware of which root|user opened a file...
best,
Yvon Le 3 nov. 06 à 16:20, Rob McBroom a écrit :
On Nov 3, 2006, at 12:06 AM, Une Bévue wrote:
something i didn't understood, suppose i write a wrapper to mate "sudo_mate" even launching TextMate like that :
sudo /Applications/TextMate/TextMate.app/Contents/MacOS/TextMate blahblah
In my experience, any time I need to edit a file I don't have access to, TextMate will realize that and authenticate me so I can save the file. This probably requires you to be in the admin group, but then so does sudo (by default), right? The only possible drawback is that new files might not get root as the owner. But maybe in that case you could just do:
i just dis a small over a file on my desktop :
~/Desktop/sudo_textmate%> ls -al -rw-rw-rw- 1 news admin 122 Nov 3 11:01 essai-sudo-config
i open it with TextMate, add "Hello world !" inside and save it.
TextMate didn't ask in authetification and the file has now those user:group :
~/Desktop/sudo_textmate%> ls -al -rw-rw-rw- 1 yvon yvon 140 Nov 3 18:16 essai-sudo-config
(yvon being my login name)
this should be considered as a bug afaik ?
TextMate would have either not open the file or ask for authentification ...
I'm usinf TextMate Version 1.5.4 (1324).
also for mate it is, in my opinion, about the same because on my box mate leaves in :
~/Desktop/sudo_textmate%> which mate /opt/local/bin/mate
where all the bins are aware of which root|user opened a file...
HOWEVER other people don't have this experience with TextMate, they have veryfied TextMate doesn't change file owber and asks for authentification.
then the prob comes from my machine...
i'm wiping out TextMate and related to get a fresh install...
best,
Yvon