Hey all,
from time to time TextMate wants my password in order to save a file having the following perms :
-rwxr-xr-x 1 yvon yvon 591 Mar 12 10:19 run.rb
even after entering the correct pwd, i'm unable to save the file thought i've found a workaround :
copy the content into the clipboard ; close the file without saving ;
re-open the file ;
paste the clipboard within this file.
have you heard of such a behaviour ?
best,
Yvon
On 12/3/2006, at 10:29, Yvon Thoraval wrote:
from time to time TextMate wants my password in order to save a file having the following perms :
That it wants password is not always a sign of lack of premissions. Currently it asks for password when it can’t save the file, but think it should be able to (i.e. retrying as root).
copy the content into the clipboard ; close the file without saving ;
re-open the file ;
paste the clipboard within this file.
have you heard of such a behaviour ?
That’s very strange. TextMate keeps no locks on the file, or keeps it “open”. So closing the window should make absolutely no change to the disk or the state of the file on disk (i.e. open count, or advisory lock state).
Is this on a normal HFS+ formatted local disk?
Could you check Console to see if there should be a problem with the file reported there?
On Mar 12, 2006, at 7:13 PM, Allan Odgaard wrote:
On 12/3/2006, at 10:29, Yvon Thoraval wrote:
from time to time TextMate wants my password in order to save a file having the following perms :
That it wants password is not always a sign of lack of premissions. Currently it asks for password when it can’t save the file, but think it should be able to (i.e. retrying as root).
copy the content into the clipboard ; close the file without saving ;
re-open the file ;
paste the clipboard within this file.
have you heard of such a behaviour ?
That’s very strange. TextMate keeps no locks on the file, or keeps it “open”. So closing the window should make absolutely no change to the disk or the state of the file on disk (i.e. open count, or advisory lock state).
FWIW, sometimes when I edit root-owned files, I have to authenticate twice in a row before the file saves. But then it saves just fine.
Perhaps the first authentication is one layer, and the second (after close/new document) is a second layer?
On Mar 12, 2006, at 10:51 PM, Gavin Kistner wrote:
FWIW, sometimes when I edit root-owned files, I have to authenticate twice in a row before the file saves. But then it saves just fine.
That happens to me too. The first time I save a root-owned file it authenticates twice, but in any subsequent saves of the file it authenticates only once.
Haris
On 13/3/2006, at 6:01, Charilaos Skiadas wrote:
On Mar 12, 2006, at 10:51 PM, Gavin Kistner wrote:
FWIW, sometimes when I edit root-owned files, I have to authenticate twice in a row before the file saves. But then it saves just fine.
That happens to me too. The first time I save a root-owned file it authenticates twice, but in any subsequent saves of the file it authenticates only once.
The reason is that TM uses a bundled helper tool to do the actual saving.
This tool has setuid and is owned by root, meaning that everything it does, is done as root. To operate, this tool needs a com.macromates.textmate.openfile.readwrite.* right.
So normally when you save a file, and a password is requested, TextMate does not ask for the right to execute a program as root, instead it asks to obtain the right which is named above (for which things like who should be able to obtain it, for how long the right should be granted w/o password before asking for a new (timeout) etc. can be adjusted in the /etc/authorization file (for this right specifically, or for rights matching a pattern)).
However, since I cannot ship TextMate with the helper tool owned by roor and with the setuid bit set, I need to have TextMate setup the helper tool correct, and this can only be done as root.
So the first password requester asks for the right to execute code as root (basically sudo), and the second password requester then asks for the lesser right of simply operating the helper tool (enforced by the helper tool itself).
After having setup the helper tool correctly, there should no longer be asked permission to run code as root, and only one password requester should appear (but when/if you upgrade TM, the state of the helper tool is reset, and afterwards you will again get two password requesters).
I don’t know how easy this was to follow, but put shortly: it should ask for password twice, because it wants to do two different things, for which the rights are different.
Le 13 mars 06 à 03:13, Allan Odgaard a écrit :
Is this on a normal HFS+ formatted local disk?
yes, absolutely ;-)
Could you check Console to see if there should be a problem with the file reported there?
i'll do that newt time it arroses, because i'm not sure about the console message i get yesterday, here it is :
2006-03-12 10:09:21.875 TextMate[393] *** run.rb updated w/o changes 2006-03-12 10:09:21.876 TextMate[393] *** last date 2006-03-12 10:07:44 +0100, new date 2006-03-12 10:08:14 +0100 2006-03-12 10:14:00.169 Finder[85] CFLog (0): CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary. 2006-03-12 10:14:00.173 Finder[85] CFLog (0): CFPropertyListCreateFromXMLData(): The file name for this data might be (or it might not): /System/Library/Frameworks/Foundation.framework/ Resources/Languages/fr 2006-03-12 10:14:00.181 Finder[85] CFLog (0): CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary. 2006-03-12 10:14:00.186 Finder[85] CFLog (0): CFPropertyListCreateFromXMLData(): The file name for this data might be (or it might not): /System/Library/Frameworks/Foundation.framework/ Resources/Languages/fr
perms and owner being :
-rwxr-xr-x 1 yvon yvon run.rb
this kind of prob arroses only after getting back to TextMate.
best
Yvon