Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2023
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 4.11 KB | None | 0 0
  1. {
  2.   "@context": [
  3.     "https://www.w3.org/ns/activitystreams",
  4.     "https://w3id.org/security/v1",
  5.     {
  6.       "lemmy": "https://join-lemmy.org/ns#",
  7.       "litepub": "http://litepub.social/ns#",
  8.       "pt": "https://joinpeertube.org/ns#",
  9.       "sc": "http://schema.org/",
  10.       "ChatMessage": "litepub:ChatMessage",
  11.       "commentsEnabled": "pt:commentsEnabled",
  12.       "sensitive": "as:sensitive",
  13.       "matrixUserId": "lemmy:matrixUserId",
  14.       "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
  15.       "removeData": "lemmy:removeData",
  16.       "stickied": "lemmy:stickied",
  17.       "moderators": {
  18.         "@type": "@id",
  19.         "@id": "lemmy:moderators"
  20.       },
  21.       "expires": "as:endTime",
  22.       "distinguished": "lemmy:distinguished",
  23.       "language": "sc:inLanguage",
  24.       "identifier": "sc:identifier"
  25.     }
  26.   ],
  27.   "type": "Note",
  28.   "id": "https://lemmy.cafe/comment/1368187",
  29.   "attributedTo": "https://lemmy.cafe/u/Illecors",
  30.   "to": [
  31.     "https://www.w3.org/ns/activitystreams#Public"
  32.   ],
  33.   "cc": [
  34.     "https://lemmy.ml/c/linux",
  35.     "https://lemmy.dbzer0.com/u/Harry_h0udini"
  36.   ],
  37.   "content": "<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">#!/usr/bin/env bash\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">exec &gt; /tmp/sda-debug.log 2&gt;&amp;amp;1 # The last &quot;word&quot; of this line is 4 chars - two, greater than, ampersand and one\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\"># strict mode\n</span><span style=\"color:#323232;\">set -euxo pipefail\n</span><span style=\"color:#323232;\">IFS=$&#39;\\n\\t&#39;\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">TARGET=&quot;/tmp/myprecious&quot;\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">umount /dev/sda4 || true\n</span><span style=\"color:#323232;\">mkdir -p &quot;$TARGET&quot;\n</span><span style=\"color:#323232;\">mount /dev/sda4 &quot;$TARGET&quot;\n</span><span style=\"color:#323232;\">ls -la &quot;$TARGET&quot; # attempt read\n</span><span style=\"color:#323232;\">touch &quot;$TARGET&quot;/testfile # attempt write\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">rm &quot;$TARGET&quot;/testfile\n</span><span style=\"color:#323232;\">umount &quot;$TARGET&quot;\n</span><span style=\"color:#323232;\">rmdir &quot;$TARGET&quot;\n</span></pre>\n<ul>\n<li>Save this to a file somewhere, let’s call it <code>sda-debug.sh</code></li>\n<li>Make the script executable: <code>chmod +x sda-debug.sh</code></li>\n<li>Run it as root: <code>sudo ./sda-debug.sh</code></li>\n<li>Paste the content of <code>/tmp/sda-debug.log</code> here</li>\n</ul>\n<hr />\n<p>EDIT: changed the script to log everything to a file for easier copy-past-ability.</p>\n",
  38.   "inReplyTo": "https://lemmy.dbzer0.com/post/2570805",
  39.   "mediaType": "text/html",
  40.   "source": {
  41.     "content": "```\n#!/usr/bin/env bash\n\nexec > /tmp/sda-debug.log 2>&amp;1 # The last \"word\" of this line is 4 chars - two, greater than, ampersand and one\n\n# strict mode\nset -euxo pipefail\nIFS=$'\\n\\t'\n\nTARGET=\"/tmp/myprecious\"\n\numount /dev/sda4 || true\nmkdir -p \"$TARGET\"\nmount /dev/sda4 \"$TARGET\"\nls -la \"$TARGET\" # attempt read\ntouch \"$TARGET\"/testfile # attempt write\n\nrm \"$TARGET\"/testfile\numount \"$TARGET\"\nrmdir \"$TARGET\"\n```\n\n\n- Save this to a file somewhere, let's call it `sda-debug.sh`\n- Make the script executable: `chmod +x sda-debug.sh`\n- Run it as root: `sudo ./sda-debug.sh`\n- Paste the content of `/tmp/sda-debug.log` here\n\n___________\nEDIT: changed the script to log everything to a file for easier copy-past-ability.",
  42.     "mediaType": "text/markdown"
  43.   },
  44.   "published": "2023-08-23T07:08:10.894383+00:00",
  45.   "updated": "2023-08-23T09:25:34.727854+00:00",
  46.   "tag": [
  47.     {
  48.       "href": "https://lemmy.dbzer0.com/u/Harry_h0udini",
  49.       "name": "@[email protected]",
  50.       "type": "Mention"
  51.     }
  52.   ],
  53.   "distinguished": false,
  54.   "language": {
  55.     "identifier": "en",
  56.     "name": "English"
  57.   },
  58.   "audience": "https://lemmy.ml/c/linux"
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement