[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Files created with emacs are owned by system
From: |
Peter Dyballa |
Subject: |
Re: Files created with emacs are owned by system |
Date: |
Fri, 1 Aug 2008 17:31:26 +0200 |
Am 01.08.2008 um 16:22 schrieb iainb.forms:
4. How do you know this?: I press C-x C-f, type in the filename, press
return, and then use Finder > Get Info or ls -al from a terminal;
My question was: from where do you know it's root that driving your
Emacs?
6. What is this file?: any file I save from Emacs using C-x C-f.
My question was: what is this file that you use to launch Emacs? 'ls -
l `which emacs`' would give the answer. And another:
file `which emacs`
7. emacs -q:
-rw-r--r-- 1 root iainb 10 Aug 1 15:04 Dummyfileq.hs
It's more than 1 hour elder than your eMail ...
8. emacs -Q: unknown option; I also can't find it in the man page.
That's OK: GNU Emacs 21.2 does not know -Q, the option --no-site-file
would perform the same.
Most importantly, (probably) it does seem that emacs is running as
root
ps -aux | grep emacs:
root 1805 0.0 -0.2 48104 4548 p2 S+ 7:38PM 0:00.36
emacs
This shows that *some* emacs (script or whatever) is running since
yesterday evening, or such, in terminal /dev/ttyp2 and obviously
launched (and owned) by root. For ps you could use an alias or shell
function like
for (t)csh: ps -lwwx | egrep UID\|\!:1 | grep -v grep
for bash: () { ps -lwwx | egrep UID\|${1} | grep -v grep ; }
but both won't work here correctly (except $* is used instead of $1).
And actually you would need to put Apple's Emacs into the background
(C-z) in that Terminal and then invoke:
ps -aux -t `tty | cut -c 9-` | egrep 'USER|emacs'
and also:
pstree -w -p $$
The shell command fg will bring Emacs back from background into the
foreground.
I have no idea why it's doing this or how to change it. If I quit
emacs and while in the same terminal run "whoami", I'm still iainb.
You could reveal the sorted output from the env command ... And: in
Emacs you could launch also a shell (M-x shell RET) and invoke there
too: env | sort.
--
Greetings
Pete
When in doubt, use brute force.
– Ken Thompson
- Re: Files created with emacs are owned by system, (continued)
- Re: Files created with emacs are owned by system, Peter Dyballa, 2008/08/01
- Re: Files created with emacs are owned by system, Joost Kremers, 2008/08/01
- Re: Files created with emacs are owned by system, Peter Dyballa, 2008/08/01
- Message not available
- Re: Files created with emacs are owned by system, David Kastrup, 2008/08/01
- Re: Files created with emacs are owned by system, Peter Dyballa, 2008/08/01
- Re: Files created with emacs are owned by system, iainb . forms, 2008/08/02
- Re: Files created with emacs are owned by system, Mark Hood, 2008/08/06
- Message not available
- Re: Files created with emacs are owned by system, Joost Kremers, 2008/08/01
- Re: Files created with emacs are owned by system, Tim X, 2008/08/01
- Message not available
- Re: Files created with emacs are owned by system, D. Power, 2008/08/02
- Re: Files created with emacs are owned by system,
Peter Dyballa <=
- Re: Files created with emacs are owned by system, Tim X, 2008/08/01
- Re: Files created with emacs are owned by system, Tim X, 2008/08/01
- Message not available
- Re: Files created with emacs are owned by system, iainb . forms, 2008/08/01
- Re: Files created with emacs are owned by system, Joost Kremers, 2008/08/01
- Re: Files created with emacs are owned by system, Peter Dyballa, 2008/08/01
- Re: Files created with emacs are owned by system, Tim X, 2008/08/01