help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Files created with emacs are owned by system


From: Tim X
Subject: Re: Files created with emacs are owned by system
Date: Sat, 02 Aug 2008 11:48:23 +1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

iainb.forms@googlemail.com writes:

> On Aug 1, 12:52 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>> Am 01.08.2008 um 13:32 schrieb iainb.forms:
>>
>> > -rw-r--r--    1 root   iainb       8 Aug  1 12:27 Dummyfile.hs
>>
>> This file is owned by root – not by you.
>>
>> You should try:
>>
>>         sudo chown -R iainb:iainb ~iainb
>>
>> log off and in again.
>>
>> --
>> Greetings
>>
>>    Pete
>>
>> Without vi there is only GNU Emacs
>
> What I'm really looking for is a way to stop emacs saving files as
> root, or else I'm going to have to run chown every time I create a
> file, or create the file using touch and then open it in emacs.
>
> Neither of these is an optimal solution. Surely there must be some
> sort of setting that tells emacs who to save files as?

For emacs to save files as root, it has to be runninig as root. What you
need to determine is why emacs is running as root. A couple of ways that
I  can think of wehre this can happen include -

1. Emacs has the setuid bit set 

2. The way you are starting emacs is causing it to be run inside a root
process. 

3. Something is really screwed up in your user environment. 

I believed you posted something that showed emacs is running as root. Do
the following 

ls -l /usr/bin/emacs (assuming emacs is in /usr/bini)

This will show you if the setuid bit is set.

Do you run emacs by typing it from the command line or from a menu or
some other launcher? 

Do ls -d /home

and  ls -ld /home/<username> and check what permissions are set. 

Tim



-- 
tcross (at) rapttech dot com dot au


reply via email to

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