{"id":614,"date":"2016-02-26T09:00:25","date_gmt":"2016-02-26T09:00:25","guid":{"rendered":"http:\/\/www.intelli.ch\/?p=614"},"modified":"2017-01-06T08:22:29","modified_gmt":"2017-01-06T08:22:29","slug":"owncloud-berechtigungensicherheit","status":"publish","type":"post","link":"https:\/\/www.dev-metal.ch\/?p=614","title":{"rendered":"Owncloud: Berechtigungen\/Sicherheit"},"content":{"rendered":"<p>Die Owncloud Installation sollte so strickte wie m\u00f6glich abgesichert werden. Dazu gibt es ein sch\u00f6nes Script, welches die Berechtigungen der Onwcloud-Installation automatisch setzt:<!--more--><\/p>\n<pre class=\"lang:sh decode:true \">#!\/bin\/bash\r\nocpath='\/var\/www\/owncloud'\r\nhtuser='www-data'\r\nhtgroup='www-data'\r\nrootuser='root'\r\n\r\nprintf \"Creating possible missing Directories\\n\"\r\nmkdir -p $ocpath\/data\r\nmkdir -p $ocpath\/assets\r\n\r\nprintf \"chmod Files and Directories\\n\"\r\nfind ${ocpath}\/ -type f -print0 | xargs -0 chmod 0640\r\nfind ${ocpath}\/ -type d -print0 | xargs -0 chmod 0750\r\n\r\nprintf \"chown Directories\\n\"\r\nchown -R ${rootuser}:${htgroup} ${ocpath}\/\r\nchown -R ${htuser}:${htgroup} ${ocpath}\/apps\/\r\nchown -R ${htuser}:${htgroup} ${ocpath}\/config\/\r\nchown -R ${htuser}:${htgroup} ${ocpath}\/data\/\r\nchown -R ${htuser}:${htgroup} ${ocpath}\/themes\/\r\nchown -R ${htuser}:${htgroup} ${ocpath}\/assets\/\r\n\r\nchmod +x ${ocpath}\/occ\r\n\r\nprintf \"chmod\/chown .htaccess\\n\"\r\nif [ -f ${ocpath}\/.htaccess ]\r\n then\r\n  chmod 0644 ${ocpath}\/.htaccess\r\n  chown ${rootuser}:${htgroup} ${ocpath}\/.htaccess\r\nfi\r\nif [ -f ${ocpath}\/data\/.htaccess ]\r\n then\r\n  chmod 0644 ${ocpath}\/data\/.htaccess\r\n  chown ${rootuser}:${htgroup} ${ocpath}\/data\/.htaccess\r\nfi<\/pre>\n<p>Referenzen<\/p>\n<p><a href=\"https:\/\/doc.owncloud.org\/server\/8.2\/admin_manual\/installation\/installation_wizard.html#strong-perms-label\" target=\"_blank\">https:\/\/doc.owncloud.org\/server\/8.2\/admin_manual\/installation\/installation_wizard.html#strong-perms-label<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Die Owncloud Installation sollte so strickte wie m\u00f6glich abgesichert werden. Dazu gibt es ein sch\u00f6nes Script, welches die Berechtigungen der Onwcloud-Installation automatisch setzt:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[12],"tags":[],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-nextcloud"],"modified_by":"ralph","_links":{"self":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=614"}],"version-history":[{"count":2,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/614\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}