{"id":773,"date":"2015-01-23T19:21:12","date_gmt":"2015-01-23T17:21:12","guid":{"rendered":"https:\/\/bergs.biz\/blog\/?p=773"},"modified":"2015-01-23T19:21:12","modified_gmt":"2015-01-23T17:21:12","slug":"remove-sensitive-files-synology-debug-dat","status":"publish","type":"post","link":"https:\/\/bergs.biz\/blog\/2015\/01\/23\/remove-sensitive-files-synology-debug-dat\/","title":{"rendered":"Remove sensitive files from Synology debug.dat"},"content":{"rendered":"<p>Sometimes Synology support ask that you support a debug log. This can be done by launching the Support Center application. Then go to Support Services &gt; Log Generation &gt; push button &#8220;Generate logs&#8221;.<\/p>\n<p>If you are concerned that you might give them sensitive information you can clean up the <code>debug.dat<\/code> file and remove the sensitive files from it.<\/p>\n<p>I wrote a quick shell script that should runs under Mac OS X, but should also run under Linux. Here it is:<\/p>\n<pre>#!\/bin\/bash\r\n\r\nDEBUG_FILE=\"$1\"\r\nNEW_FILE=\"$2\"\r\nif [ -z \"${DEBUG_FILE}\" -o -z \"${NEW_FILE}\" ]; then\r\n\u00a0\u00a0 \u00a0echo \"You must specify the path to the debug AND to the new file, quitting...\"\r\n\u00a0\u00a0 \u00a0exit 1\r\nfi\r\n\r\nif [ -z \"$TMPDIR\" ]; then\r\n\u00a0\u00a0 \u00a0TMPDIR=\"\/var\/tmp\"\r\nfi\r\n\r\nPROG=\"`basename $0`\"\r\n\r\nif [ ! -r \"${DEBUG_FILE}\" ]; then\r\n\u00a0\u00a0 \u00a0echo \"Debug file ${DEBUG_FILE} is unreadable, quitting...\"\r\n\u00a0\u00a0 \u00a0exit 1\r\nfi\r\n\r\nif [ -f \"${NEW_FILE}\" ]; then\r\n\u00a0\u00a0 \u00a0echo \"New file ${NEW_FILE} already exists, quitting...\"\r\n\u00a0\u00a0 \u00a0exit 1\r\nfi\r\n\r\nEXCLUDE_PAT=\"`mktemp -t ${PROG}`\" || exit 1\r\n\r\ncat &gt;\"${EXCLUDE_PAT}\" &lt;&lt;EOF\r\nvolume1\/@tmp\/SupportFormAttach28229\/dsm\/etc\/application_key.conf\r\nvolume1\/@tmp\/SupportFormAttach28229\/dsm\/etc\/shadow*\r\nvolume1\/@tmp\/SupportFormAttach28229\/dsm\/etc\/ssl\/*\r\nEOF\r\n\r\ntar cfz \"${NEW_FILE}\" -X \"${EXCLUDE_PAT}\" @\"${DEBUG_FILE}\"\r\n\r\nrm -f ${EXCLUDE_PAT}<\/pre>\n<p>If this is helpful for anybody, please let me know by commenting on this article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to remove sensitive files from Synology debug.dat in case of privacy or security concerns.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54,46,133],"tags":[],"class_list":["post-773","post","type-post","status-publish","format-standard","hentry","category-datenschutz","category-security-computers","category-storage-computers"],"_links":{"self":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/comments?post=773"}],"version-history":[{"count":1,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/773\/revisions"}],"predecessor-version":[{"id":774,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/773\/revisions\/774"}],"wp:attachment":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/media?parent=773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/categories?post=773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/tags?post=773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}