all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* buffer uid
@ 2003-10-10 17:48 Arthur Davis
  0 siblings, 0 replies; 5+ messages in thread
From: Arthur Davis @ 2003-10-10 17:48 UTC (permalink / raw)


Is it possible to open a buffer and edit it as a different user?  In
other words, if I have two user accounts, can I run emacs from one
account and edit a file owned by the other account (and not writable
by the account running emacs)?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: buffer uid
       [not found] <mailman.1502.1065808219.21628.help-gnu-emacs@gnu.org>
@ 2003-10-10 18:02 ` Stefan Monnier
  2003-10-10 20:33 ` J-P Theberge
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2003-10-10 18:02 UTC (permalink / raw)


> Is it possible to open a buffer and edit it as a different user?  In
> other words, if I have two user accounts, can I run emacs from one
> account and edit a file owned by the other account (and not writable
> by the account running emacs)?

The Tramp package allows you to do that (as long as you have `su', `sudo'
or `ssh' shell access to the other user).


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: buffer uid
       [not found] <mailman.1502.1065808219.21628.help-gnu-emacs@gnu.org>
  2003-10-10 18:02 ` Stefan Monnier
@ 2003-10-10 20:33 ` J-P Theberge
  1 sibling, 0 replies; 5+ messages in thread
From: J-P Theberge @ 2003-10-10 20:33 UTC (permalink / raw)


Arthur Davis <adavis@torrentnet.com> writes:

> Is it possible to open a buffer and edit it as a different user?  In
> other words, if I have two user accounts, can I run emacs from one
> account and edit a file owned by the other account (and not writable
> by the account running emacs)?

Hi,

I use this:

(defun find-file-as-another-user (f u)
  (interactive "sFind file: \ns as user: ")
  (require 'tramp)
  (find-file (concat "/su:" u "@localhost:" f)))

It require tramp

-jp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: buffer uid
@ 2003-10-16 13:30 andrew.maguire
  0 siblings, 0 replies; 5+ messages in thread
From: andrew.maguire @ 2003-10-16 13:30 UTC (permalink / raw)
  Cc: help-gnu-emacs

> Is it possible to open a buffer and edit it as a different user?  In
> other words, if I have two user accounts, can I run emacs from one
> account and edit a file owned by the other account (and not writable
> by the account running emacs)?

If you have ftp access then you can try and use find-file with a path:

/user@host:/path/to/file

you will then be prompted for a password if necessary.
host can be "localhost" to use the same machine.
You can omit "user@" if you want to login as yourself.

Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: buffer uid
       [not found] <mailman.1794.1066311260.21628.help-gnu-emacs@gnu.org>
@ 2003-10-18  7:05 ` Tim X
  0 siblings, 0 replies; 5+ messages in thread
From: Tim X @ 2003-10-18  7:05 UTC (permalink / raw)


>>>>> "andrew" == andrew maguire <andrew.maguire@ps.ge.com> writes:

 >> Is it possible to open a buffer and edit it as a different user?
 >> In other words, if I have two user accounts, can I run emacs from
 >> one account and edit a file owned by the other account (and not
 >> writable by the account running emacs)?

 andrew> If you have ftp access then you can try and use find-file
 andrew> with a path:

 andrew> /user@host:/path/to/file

 andrew> you will then be prompted for a password if necessary.  host
 andrew> can be "localhost" to use the same machine.  You can omit
 andrew> "user@" if you want to login as yourself.

An alternative solution is to use TRAMP instead of FTP. You can
configure TRAMP so that you can edit files under different uids on the
local (and remote) system. I use this when I want to edit a config
file owned by root, but don't want to exit my normal user session. 

A description of how to do this is in the TRAMP manual. This nice
thing about using tramp is you don't have to have ftp configured.

Tim



-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-18  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-10 17:48 buffer uid Arthur Davis
     [not found] <mailman.1502.1065808219.21628.help-gnu-emacs@gnu.org>
2003-10-10 18:02 ` Stefan Monnier
2003-10-10 20:33 ` J-P Theberge
  -- strict thread matches above, loose matches on Subject: below --
2003-10-16 13:30 andrew.maguire
     [not found] <mailman.1794.1066311260.21628.help-gnu-emacs@gnu.org>
2003-10-18  7:05 ` Tim X

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.