{"id":928,"date":"2024-04-09T06:43:38","date_gmt":"2024-08-25T10:26:29","guid":{"rendered":""},"modified":"2025-02-02T00:46:16","modified_gmt":"2025-02-01T23:46:16","slug":"linux-chmod-befehl-tutorial-f-r-anf-nger","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/linux-chmod-befehl-tutorial-f-r-anf-nger\/","title":{"rendered":"Linux chmod Befehl Tutorial f\u00fcr Anf\u00e4nger"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<h1>\u00a0<\/h1>\n<p>Der <code>chmod<\/code> Befehl ist ein grundlegendes Werkzeug in Linux, um die Zugriffsrechte von Dateien und Verzeichnissen zu verwalten. In diesem Tutorial werden wir die Grundlagen von <code>chmod<\/code> erkl\u00e4ren und Ihnen zeigen, wie Sie es auf Ihrem Linux <a href=\"https:\/\/netcloud24.com?language=german&amp;currency=4\" target=\"_blank\" rel=\"follow\">VPS-Server<\/a> verwenden k\u00f6nnen.<\/p>\n<h2>Was sind Zugriffsrechte?<\/h2>\n<p>Jede Datei und jedes Verzeichnis in Linux hat Zugriffsrechte, die festlegen, wer welche Aktionen damit durchf\u00fchren darf. Es gibt drei Arten von Benutzern:<\/p>\n<ul>\n<li><strong>Eigent\u00fcmer (u):<\/strong> Der Benutzer, dem die Datei oder das Verzeichnis geh\u00f6rt.<\/li>\n<li><strong>Gruppe (g):<\/strong> Eine Gruppe von Benutzern, die Zugriff auf die Datei oder das Verzeichnis haben.<\/li>\n<li><strong>Andere (o):<\/strong> Alle anderen Benutzer.<\/li>\n<\/ul>\n<p>F\u00fcr jede dieser Benutzergruppen k\u00f6nnen drei Arten von Zugriffsrechten festgelegt werden:<\/p>\n<ul>\n<li><strong>Lesen (r):<\/strong> Berechtigung zum Lesen des Inhalts der Datei oder zum Auflisten des Inhalts eines Verzeichnisses.<\/li>\n<li><strong>Schreiben (w):<\/strong> Berechtigung zum \u00c4ndern des Inhalts der Datei oder zum Erstellen, L\u00f6schen oder Umbenennen von Dateien in einem Verzeichnis.<\/li>\n<li><strong>Ausf\u00fchren (x):<\/strong> Berechtigung zum Ausf\u00fchren der Datei (wenn es sich um ein Programm handelt) oder zum Betreten eines Verzeichnisses.<\/li>\n<\/ul>\n<h2>Syntax von chmod<\/h2>\n<p>Die grundlegende Syntax von <code>chmod<\/code> lautet:<\/p>\n<pre><code>chmod [OPTIONEN] MODUS DATEI<\/code><\/pre>\n<p>Dabei gilt:<\/p>\n<ul>\n<li><strong>OPTIONEN:<\/strong> Zus\u00e4tzliche Optionen, z.B. <code>-R<\/code>, um die \u00c4nderung rekursiv auf alle Dateien und Unterverzeichnisse anzuwenden.<\/li>\n<li><strong>MODUS:<\/strong> Die neuen Zugriffsrechte, die Sie festlegen m\u00f6chten.<\/li>\n<li><strong>DATEI:<\/strong> Die Datei oder das Verzeichnis, deren\/dessen Zugriffsrechte Sie \u00e4ndern m\u00f6chten.<\/li>\n<\/ul>\n<h2>Modi zum Festlegen von Zugriffsrechten<\/h2>\n<p>Es gibt zwei Hauptmethoden, um den MODUS in <code>chmod<\/code> anzugeben:<\/p>\n<h3>1. Symbolische Notation<\/h3>\n<p>Verwendet Buchstaben und Symbole, um die Zugriffsrechte zu beschreiben:<\/p>\n<ul>\n<li><strong>u, g, o:<\/strong> Eigent\u00fcmer, Gruppe, Andere<\/li>\n<li><strong>r, w, x:<\/strong> Lesen, Schreiben, Ausf\u00fchren<\/li>\n<li><strong>+:<\/strong> Berechtigung hinzuf\u00fcgen<\/li>\n<li><strong>-:<\/strong> Berechtigung entfernen<\/li>\n<li><strong>=:<\/strong> Berechtigung setzen (alle anderen entfernen)<\/li>\n<\/ul>\n<p>Beispiele:<\/p>\n<pre><code>chmod u+x datei.sh  # F\u00fcgt dem Eigent\u00fcmer Ausf\u00fchrungsrechte hinzu\r\nchmod go-w dokument.txt # Entfernt Schreibberechtigungen f\u00fcr Gruppe und Andere\r\nchmod u=rwx,go=r datei.txt # Setzt Lese-, Schreib- und Ausf\u00fchrungsrechte f\u00fcr den Eigent\u00fcmer und nur Leserechte f\u00fcr Gruppe und Andere<\/code><\/pre>\n<h3>2. Oktale Notation<\/h3>\n<p>Verwendet Oktalzahlen, um die Zugriffsrechte darzustellen:<\/p>\n<ul>\n<li><strong>4:<\/strong> Lesen (r)<\/li>\n<li><strong>2:<\/strong> Schreiben (w)<\/li>\n<li><strong>1:<\/strong> Ausf\u00fchren (x)<\/li>\n<li><strong>0:<\/strong> Keine Berechtigung<\/li>\n<\/ul>\n<p>Die Oktalzahl wird aus der Summe der Berechtigungen f\u00fcr jede Benutzergruppe gebildet. Zum Beispiel:<\/p>\n<ul>\n<li><strong>7:<\/strong> rwx (Lesen, Schreiben, Ausf\u00fchren)<\/li>\n<li><strong>6:<\/strong> rw- (Lesen, Schreiben)<\/li>\n<li><strong>5:<\/strong> r-x (Lesen, Ausf\u00fchren)<\/li>\n<li><strong>4:<\/strong> r&#8211; (Lesen)<\/li>\n<li><strong>3:<\/strong> -wx (Schreiben, Ausf\u00fchren)<\/li>\n<li><strong>2:<\/strong> -w- (Schreiben)<\/li>\n<li><strong>1:<\/strong> &#8211;x (Ausf\u00fchren)<\/li>\n<li><strong>0:<\/strong> &#8212; (Keine Berechtigung)<\/li>\n<\/ul>\n<p>Beispiele:<\/p>\n<pre><code>chmod 755 datei.sh # rwxr-xr-x (Eigent\u00fcmer hat alle Rechte, Gruppe und Andere haben Lese- und Ausf\u00fchrungsrechte)\r\nchmod 644 dokument.txt # rw-r--r-- (Eigent\u00fcmer hat Lese- und Schreibzugriff, Gruppe und Andere haben nur Lesezugriff)<\/code><\/pre>\n<h2>Fazit<\/h2>\n<p>Der <code>chmod<\/code> Befehl ist ein unverzichtbares Werkzeug zur Verwaltung von Zugriffsrechten in Linux. Mit diesem Tutorial haben Sie die Grundlagen gelernt und k\u00f6nnen nun die Zugriffsrechte auf Ihrem System sicher verwalten.<\/p>\n<p><a href=\"https:\/\/de.netcloud24.com\/\" target=\"_blank\">Windows VPS Deutschland<\/a><\/p>\n<p><a href=\"https:\/\/es.netcloud24.com\/\" target=\"_blank\">Windows VPS Espa\u00f1a<\/a><\/p>\n<p><a href=\"https:\/\/nl.netcloud24.com\/\" target=\"_blank\">Windows VPS Nederland<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">Windows VPS Italia<\/a><\/p>\n<p><a href=\"https:\/\/pt.netcloud24.com\/\" target=\"_blank\">Windows VPS Portugal<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">VPS Windows Italia<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Sverige<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Norge<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS T\u00fcrkiye<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows RDS (Remote Desktop Services)<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Der chmod Befehl ist ein grundlegendes Werkzeug in Linux, um die Zugriffsrechte von Dateien und Verzeichnissen zu verwalten. In diesem Tutorial werden wir die Grundlagen von\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=928"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}