Re: Automatically marking downloaded files (was Re: Automatic downloading of non-free software by stuff in main)
Anthony DeRobertis wrote:
> On 12/05/2017 03:48 PM, Diane Trout wrote:
>> I would love for files downloaded via a web browser or email client to
>> be marked as having come from the Internet. (Major bonus points if a
>> sync tool like nextcloud can keep files I generated labeled separate
>> from ones my coworkers made)
>
> Chromium (by default), wget (by default), and curl (with --xattr) at
> least already do this; they set the user.xdg.origin.url extended
> attribute as documented at
> https://www.freedesktop.org/wiki/CommonExtendedAttributes/
>
> Firefox, unfortunately, does not do so yet, see
> https://bugzilla.mozilla.org/show_bug.cgi?id=665531
TIL!
For those playing along at home who are curious:
# apt install xattr
$ wget https://www.debian.org/
$ xattr -l index.html
user.xdg.origin.url: https://www.debian.org/
Some notes:
* wget in stretch doesn't set xattrs (but the version in sid does)
* chromium doesn't set xattrs if you "File→Save" but does if the file type
is downloaded.
* I wasn't successful in doing this on a tmpfs - perhaps there are
additional runes to add to the mount options that would make that possible.
* getfattr from the attr package also works
--
Stuart Prescott http://www.nanonanonano.net/ stuart@nanonanonano.net
Debian Developer http://www.debian.org/ stuart@debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
Reply to: