From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28782 invoked from network); 16 Dec 2020 18:20:41 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2020 18:20:41 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kpbPi-00AKr6-Ev for ml@inbox.vuxu.org; Wed, 16 Dec 2020 12:20:38 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1kpbPh-0008ff-Uz for ml@inbox.vuxu.org; Wed, 16 Dec 2020 12:20:37 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kpbPg-0008fZ-Sh for ding@lists.math.uh.edu; Wed, 16 Dec 2020 12:20:36 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kpbPe-00GTYx-9m for ding@lists.math.uh.edu; Wed, 16 Dec 2020 12:20:36 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References :Message-ID:Date:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PiAwBYQVyAG5v/ijpwSHcgsvyr/54+jOKLlESjKiseg=; b=U9UdnOVKglNbJiGZ6j2DFF008D YtT8aO4t35q6yYIIYF7iLg5YWR/BRfyTHG+/KtNBiu+aYEmWohnll1bzNtf9fai9CMFGJgWi+LOpj lsH24KWcghYjBBTZWEeMY35eW6dILisGf2THj7e/SEfCDRkk34tWuzHBLLTaxweoyLQA=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kpbPW-0003dL-UE for ding@gnus.org; Wed, 16 Dec 2020 19:20:30 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kpbPV-0000eJ-Na for ding@gnus.org; Wed, 16 Dec 2020 19:20:25 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: =?utf-8?Q?Adam_Sj=C3=B8gren?= Subject: Re: download attachment and do chmod for certain files Date: Wed, 16 Dec 2020 19:20:20 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <877dphsjdn.fsf@tullinup.koldfront.dk> References: <87v9d2g14c.fsf@zoho.eu> <87mtydvdfn.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:AAsjdMG8DY09E8SKVzVlAKoULgA= OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc Mail-Follow-Up-To: never X-Now-Playing: Brave for You, I See You (The xx) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR Precedence: bulk Eric writes: > I expected there would be some sort of "save MIME handle alist" thing > where you could have it automatically kick in when you saved an image, > but I didn't immediately see anything like that. There is a generic variable for setting the permissions of a saved attachment, regardless of type: ,----[ C-h v mm-attachment-file-modes RET ] | mm-attachment-file-modes is a variable defined in ‘mm-decode.el’. | Its value is 420 | Original value was 384 | | You can customize this variable. | This variable was introduced, or its default value was changed, in | version 22.1 of Emacs. | | Documentation: | Set the mode bits of saved attachments to this integer. `---- It is used in the function mm-save-part-to-file, which could either be replaced or advice'd to only have the permissions applied to specific types of attachments. Best regards, Adam P.S. (format "0%o" 420) → 0644 rw--r--r-, (format "0%o" 384) → 0600 rw------ -- "But you have heard enough, now it is time for you Adam Sjøgren to listen." asjo@koldfront.dk