[Top][All Lists]

[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
ps -aux | grep emacs:
root      1805   0.0 -0.2    48104   4548  p2  S+    7:38PM   0:00.36

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.



When in doubt, use brute force.
                                – Ken Thompson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]