* dired-do-rename owner abuse
@ 2005-06-12 19:08 Dan Jacobson
[not found] ` <E1DhqSz-0000oC-2f@fencepost.gnu.org>
2005-06-16 17:56 ` -u command line option (was: dired-do-rename owner abuse) Kevin Rodgers
0 siblings, 2 replies; 3+ messages in thread
From: Dan Jacobson @ 2005-06-12 19:08 UTC (permalink / raw)
dired-do-rename in
/usr/share/emacs/21.4/lisp:
-rw-r--r-- 1 root 78791 2002-11-14 21:15 dired-aux.el
fails to keep the owner intact.
I am root. If I do
# mv /var/spool/exim4/input/some_files ~
the group and owner, Debian-exim, is preserved, but not if I use
dired-do-rename.
Therefore I cannot temporarily park messages elsewhere without making
them unpresentable to exim when I move them back. Never mind, I will
try exim's freezing/thawing instead.
P.S., there is no error shown to the user when he executes
# emacs -nw -u /var/spool/exim4/input/ ~
(He meant
# emacs -nw -q /var/spool/exim4/input/ ~)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dired-do-rename changes owner when used by root
[not found] ` <E1DhqSz-0000oC-2f@fencepost.gnu.org>
@ 2005-06-15 22:00 ` Dan Jacobson
0 siblings, 0 replies; 3+ messages in thread
From: Dan Jacobson @ 2005-06-15 22:00 UTC (permalink / raw)
rms> What happens if you use M-x rename-file?
rms> Does it fail the same way?
Yes, when operating across disk partitions the owner is changed to
root. Same with dired-do-rename. On the same partition both are OK though.
dired-do-copy also changes the owner to root, even on the same
partition, even though it advertises that it uses cp -p in the
minibuffer. However the real Debian (GNU) cp -p would not do such a
thing.
^ permalink raw reply [flat|nested] 3+ messages in thread
* -u command line option (was: dired-do-rename owner abuse)
2005-06-12 19:08 dired-do-rename owner abuse Dan Jacobson
[not found] ` <E1DhqSz-0000oC-2f@fencepost.gnu.org>
@ 2005-06-16 17:56 ` Kevin Rodgers
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2005-06-16 17:56 UTC (permalink / raw)
Dan Jacobson wrote:
> P.S., there is no error shown to the user when he executes
> # emacs -nw -u /var/spool/exim4/input/ ~
> (He meant
> # emacs -nw -q /var/spool/exim4/input/ ~)
That's because the user-init-file-1 value constructed from
init-file-user is intentionally load'ed with NOERROR, and the
init-file-user value is never checked.
Something simple like this should suffice:
*** emacs-21.3/lisp/startup.el~ Sun Mar 16 15:05:59 2003
--- emacs-21.3/lisp/startup.el Thu Jun 16 11:49:38 2005
***************
*** 741,747 ****
argval (car args)))
(setq init-file-user argval
argval nil
! args (cdr args)))
((string-equal argi "-no-site-file")
(setq site-run-file nil
args (cdr args)))
--- 741,750 ----
argval (car args)))
(setq init-file-user argval
argval nil
! args (cdr args))
! (or (file-directory-p (concat "~" init-file-user))
! (error "Option `%s' user `%s' has no home directory"
! argi init-file-user)))
((string-equal argi "-no-site-file")
(setq site-run-file nil
args (cdr args)))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-16 17:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-12 19:08 dired-do-rename owner abuse Dan Jacobson
[not found] ` <E1DhqSz-0000oC-2f@fencepost.gnu.org>
2005-06-15 22:00 ` dired-do-rename changes owner when used by root Dan Jacobson
2005-06-16 17:56 ` -u command line option (was: dired-do-rename owner abuse) Kevin Rodgers
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).