GNU bug report logs -
#11400
24.0.95; `url-copy-file' doesn't respect the umask
Previous Next
Reported by: Donald Ephraim Curtis <dcurtis <at> milkbox.net>
Date: Fri, 4 May 2012 03:04:01 UTC
Severity: minor
Tags: fixed
Fixed in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11400 in the body.
You can then email your comments to 11400 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11400
; Package
emacs
.
(Fri, 04 May 2012 03:04:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Donald Ephraim Curtis <dcurtis <at> milkbox.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 04 May 2012 03:04:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
It seems that `url-copy-file' does not respect the `umask' value.
Here I retrieve two files, first read into a buffer and the buffer is
written. Second I use the `url-copy-file' function. When looking at
the permissions, they are not as I would expect.
melpa :master*> umask
022
melpa :master*> emacs --batch --exec '(with-current-buffer (url-retrieve-synchronously "https://secure.gravatar.com/avatar/d07c1f81d10a1d147d6b5cb80fa1c654") (write-file "genehack.jpg"))'
Contacting host: secure.gravatar.com:443
Opening TLS connection to `secure.gravatar.com'...
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com'...
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com'...failed
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com --protocols ssl3'...
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect secure.gravatar.com:443 -no_ssl2 -ign_eof'...
Opening TLS connection with `openssl s_client -connect secure.gravatar.com:443 -no_ssl2 -ign_eof'...done
Opening TLS connection to `secure.gravatar.com'...done
Type C-c C-c to view the image as an image.
Cannot display image: (Display does not support images)
Saving file /Users/dcurtis/src/melpa/genehack.jpg...
Loading vc-git...
Wrote /Users/dcurtis/src/melpa/genehack.jpg
melpa :master*> emacs --batch --exec '(url-copy-file "https://secure.gravatar.com/avatar/d07c1f81d10a1d147d6b5cb80fa1c654" "genehack2.jpg" t)'
Contacting host: secure.gravatar.com:443
Opening TLS connection to `secure.gravatar.com'...
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com'...
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com'...failed
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com --protocols ssl3'...
Opening TLS connection with `gnutls-cli --insecure -p 443 secure.gravatar.com --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect secure.gravatar.com:443 -no_ssl2 -ign_eof'...
Opening TLS connection with `openssl s_client -connect secure.gravatar.com:443 -no_ssl2 -ign_eof'...done
Opening TLS connection to `secure.gravatar.com'...done
Wrote /Users/dcurtis/src/melpa/genehack2.jpg
melpa :master*> ll genehack*
-rw-r--r-- 1 dcurtis staff 3063 Mar 25 18:38 genehack.jpg
-rw-r--r-- 1 dcurtis staff 3063 Mar 25 18:38 genehack.jpg~
-rw------- 1 dcurtis staff 2657 Mar 25 18:38 genehack2.jpg
melpa :master*>
In GNU Emacs 24.0.95.1 (i386-apple-darwin11.3.0, NS apple-appkit-1138.32)
of 2012-04-06 on bird.local
Windowing system distributor `Apple', version 10.3.1138
Configured using:
`configure '--prefix=/usr/local/Cellar/emacs/HEAD' '--without-dbus'
'--enable-locallisppath=/usr/local/share/emacs/site-lisp'
'--infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs' '--with-ns'
'--disable-ns-self-contained' 'CC=/usr/bin/llvm-gcc' 'CFLAGS=-Os -w
-pipe -march=core2 -msse4''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
shell-dirtrack-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
tar-subfile-mode: t
diff-auto-refine-mode: t
eldoc-mode: t
elisp-slime-nav-mode: t
paredit-mode: t
hl-line-mode: t
idle-highlight-mode: t
whitespace-mode: t
savehist-mode: t
recentf-mode: t
ido-ubiquitous-mode: t
ido-everywhere: t
show-paren-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
t o SPC M-d C-d M-d a C-e a n d SPC t h e SPC b u f
f e r SPC i s SPC w r i t t e n . SPC SPC S e c o n
d SPC I SPC u s e SPC t h e SPC ` u r l - c o p y -
f i l ' <backspace> e ' SPC f u n c t i o n . SPC SPC
N o t i c e SPC t h a t SPC t h e SPC C-w C-w C-w W
h e n SPC l o o k i n g SPC a t SPC t h e SPC p e r
m i s s i o n s , SPC t h e y SPC a r e SPC n o t SPC
a s SPC I SPC w o u l d SPC e x p e c t . C-c C-c y
C-x b C-g C-x C-b C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n <return> C-n C-n C-n C-n C-n C-n C-n C-n
C-p C-n C-n C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-b C-a
C-p C-p C-p C-p C-p C-p C-p C-SPC C-n C-n C-n C-n C-n
C-n C-n C-n C-n M-> M-w C-x b C-n <return> C-x 1 C-x
RET <return>
Recent messages:
Auto-saving...done
Auto-saving...done
Send this bug report to the Emacs maintainers? (y or n) y
Sending...
Sending via mail...
Sending...done
Quit
Formats have changed, recompiling...done
Updating buffer list...done
Mark set
Load-path shadows:
/Users/dcurtis/.emacs.d/elpa/jump-20120130/inflections hides /Users/dcurtis/.emacs.d/elpa/inflections-20100806/inflections
/Users/dcurtis/.emacs.d/elpa/jump-20120130/findr hides /Users/dcurtis/.emacs.d/elpa/findr-20120130/findr
~/.emacs.d/custom hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.95/lisp/custom
/Users/dcurtis/.emacs.d/elpa/jump-20120130/which-func hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.95/lisp/progmodes/which-func
/Users/dcurtis/.emacs.d/elpa/ruby-mode-20110630/ruby-mode hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.95/lisp/progmodes/ruby-mode
/Users/dcurtis/.emacs.d/elpa/full-ack-20120401/.dir-locals hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.95/lisp/gnus/.dir-locals
Features:
(ibuf-ext ibuffer mailalias mailclient browse-url qp shadow mail-extr
emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader sendmail cus-theme cus-edit
lisp-mnt shell pcomplete evil evil-integration evil-commands ert ewoc
elp evil-maps evil-types evil-macros evil-repeat evil-search evil-ex
evil-states evil-core evil-digraphs evil-common undo-tree evil-vars rx
esh-var esh-io esh-cmd esh-ext esh-proc esh-arg esh-groups eshell
esh-module esh-mode esh-util derived ediff-merg ediff-diff ediff-wind
ediff-help ediff-util ediff-mult ediff-init ediff iswitchb diff compile
mule-util finder-inf expand-region-autoloads autoload mail-utils
network-stream starttls url-cache url-http tls mail-parse rfc2231
rfc2047 rfc2045 ietf-drums url-gw url-auth url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-util url-parse
auth-source eieio gnus-util password-cache url-vars mm-util mail-prsvr
mailcap sort checkdoc tar-mode pp two-column iso-transl dired
highlight-parentheses apropos find-file-in-project magit-bisect
magit-key-mode assoc magit diff-mode log-edit pcvs-util add-log rect
flyspell ispell markdown-mode noutline outline easy-mmode deft jka-compr
find-func imenu multi-isearch hippie-exp comint regexp-opt ansi-color
help-mode view debug hi-lock time-stamp newcomment vc-git eldoc
elisp-slime-nav etags ring paredit hl-line saveplace idle-highlight-mode
thingatpt whitespace melpa molokai-theme savehist recentf tree-widget
wid-edit autorevert cua-base cus-start cus-load server misc midnight
auctex-autoloads tex-site info easymenu deft-autoloads erlang-autoloads
evil-autoloads evil-leader-autoloads evil-numbers-autoloads
evil-surround-autoloads full-ack-autoloads
highlight-parentheses-autoloads markdown-mode+-autoloads
markdown-mode-autoloads melpa-autoloads byte-opt warnings bytecomp
byte-compile cconv macroexp rinari-autoloads jump-autoloads
inflections-autoloads findr-autoloads ruby-compilation-autoloads
ruby-mode-autoloads starter-kit-bindings-autoloads windmove
starter-kit-lisp-autoloads elisp-slime-nav-autoloads
starter-kit-ruby-autoloads starter-kit-autoloads edmacro kmacro smex
starter-kit-misc ffap ido-ubiquitous ido paren starter-kit-defuns
uniquify advice help-fns advice-preload magit-autoloads
ido-ubiquitous-autoloads smex-autoloads find-file-in-project-autoloads
idle-highlight-mode-autoloads paredit-autoloads inf-ruby-autoloads
undo-tree-autoloads package tabulated-list defun cl time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#11400
; Package
emacs,gnus
.
(Thu, 10 May 2012 18:54:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 11400 <at> debbugs.gnu.org (full text, mbox):
Donald Ephraim Curtis wrote:
> It seems that `url-copy-file' does not respect the `umask' value.
Well, you could put it that way, or you could say that by default it
creates private copies. Isn't this standard practice for many
applications that download things?
url-copy-file uses mm-save-part-to-file, which sets file modes according
to mm-attachment-file-modes. For world-readable, set that to 420.
There is no setting that means "don't change the mode bits"; maybe there
should be.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#11400
; Package
emacs,gnus
.
(Thu, 10 May 2012 20:29:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 11400 <at> debbugs.gnu.org (full text, mbox):
>> It seems that `url-copy-file' does not respect the `umask' value.
> Well, you could put it that way, or you could say that by default it
> creates private copies. Isn't this standard practice for many
> applications that download things?
> url-copy-file uses mm-save-part-to-file, which sets file modes according
> to mm-attachment-file-modes. For world-readable, set that to 420.
> There is no setting that means "don't change the mode bits"; maybe there
> should be.
BTW, I don't like the idea of URL using so much of "mm-*".
That doesn't feel like the right structuring. I tend to think of mm- as
higher-level, so I'd expect mm- to use URL functions, but not the other
way around.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#11400
; Package
emacs,gnus
.
(Thu, 10 May 2012 22:24:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 11400 <at> debbugs.gnu.org (full text, mbox):
> Well, you could put it that way, or you could say that by default it
> creates private copies. Isn't this standard practice for many
> applications that download things?
I don't agree with this argument. Why is a "private" copy implied? When I use `cp' I don't expect `cp' to dictate its own permissions.
What other applications behave in this way? I use `curl' and `wget' to copy url contents and they respect the umask.
In the end, I don't care if this changes or not, but the bigger problem is that the documentation needs to direct people to the `mm-attachment-file-modes' variable because it is definitely not intuitive that the umask is determined from there.
dc
Added tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Sep 2012 19:30:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
11400 <at> debbugs.gnu.org and Donald Ephraim Curtis <dcurtis <at> milkbox.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Sep 2012 19:30:03 GMT)
Full text and
rfc822 format available.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 05 Sep 2012 19:31:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#11400
; Package
emacs,gnus
.
(Wed, 05 Sep 2012 19:33:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 11400 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Well, you could put it that way, or you could say that by default it
> creates private copies. Isn't this standard practice for many
> applications that download things?
It's standard for certain applications (like mail readers) to enforce a
separate umask, which is what Gnus does via `mm-save-part-to-file'.
However:
> url-copy-file uses mm-save-part-to-file, which sets file modes according
> to mm-attachment-file-modes. For world-readable, set that to 420.
> There is no setting that means "don't change the mode bits"; maybe there
> should be.
As Stefan points out, it's a bug for the url library to use this rather
high-level library to save stuff. And the url library has no reason not
to heed the umask.
Anyway, this isn't a Gnus bug, so I'm reassigning it back to Emacs.
--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Lars Magne Ingebrigtsen
bug reassigned from package 'emacs,gnus' to 'emacs'.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Sep 2012 19:33:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as found in versions 24.0.95.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Sep 2012 19:33:02 GMT)
Full text and
rfc822 format available.
Removed tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 01 Feb 2014 08:11:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11400
; Package
emacs
.
(Fri, 25 Dec 2015 21:38:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 11400 <at> debbugs.gnu.org (full text, mbox):
Donald Ephraim Curtis <dcurtis <at> milkbox.net> writes:
> It seems that `url-copy-file' does not respect the `umask' value.
>
> Here I retrieve two files, first read into a buffer and the buffer is
> written. Second I use the `url-copy-file' function. When looking at
> the permissions, they are not as I would expect.
This should be fixed on the Emacs trunk now.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 25 Dec 2015 21:38:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.2, send any further explanations to
11400 <at> debbugs.gnu.org and Donald Ephraim Curtis <dcurtis <at> milkbox.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 25 Dec 2015 21:38:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 23 Jan 2016 12:24:03 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:03 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 26.1.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:03 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 25.2.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Jan 2017 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 231 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.