{"version":"2.1.232","anchor":"output-files-named-by-sort-uniq-cp-and-mv-flags-now-count-as","canonical_anchor":"output-files-named-by-sort-uniq-cp-and-mv-flags-now-count-as","heading":"Output files named by sort, uniq, cp and mv flags now count as writes","tier":"notice","area":"Permissions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.232\/e\/output-files-named-by-sort-uniq-cp-and-mv-flags-now-count-as","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.232","markdown":"### Output files named by sort, uniq, cp and mv flags now count as writes\n\nOutput flags on sort, cp and mv now count as writes, so those files need write permission.\n\n**What**\n\nBash permission checks now treat a file named by an output flag as something being written, not read. `sort -o out.txt`, `sort -T dir`, and the `-t` target of `cp` and `mv` go through write permission first, and a deny stops the whole command.\n\n**Details**\n\n- The analyser carries a table of which flags take a value and which of those values are write targets: `sort: { valueLetters: \"otkST\", writeLetters: \"oT\" }`, `uniq: { valueLetters: \"fsw\", writeLetters: \"\" }`, plus the `-t` form for cp and mv.\n- `uniq` has no write letters, so its `-f`, `-s` and `-w` values are consumed as flag arguments rather than mistaken for paths.\n- Previously every path in these commands was analysed as a read.\n\n**Evidence**\n\n`sort: { valueLetters: \"otkST\", writeLetters: \"oT\" }`\n\n- Area: Permissions\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 3\/5"}