From 7c5dcfa2dc05a83debf7006a1090c6eb2606f1e3 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 12:32:17 +0200 Subject: [PATCH 01/19] Create homepage.md --- lessons/locales/da_danish/homepage.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 lessons/locales/da_danish/homepage.md diff --git a/lessons/locales/da_danish/homepage.md b/lessons/locales/da_danish/homepage.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/lessons/locales/da_danish/homepage.md @@ -0,0 +1 @@ + From ae482657ebae15610fd5e72199fa012cc9a6a114 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 12:33:09 +0200 Subject: [PATCH 02/19] Add files via upload --- lessons/locales/da_danish/home_page.md | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 lessons/locales/da_danish/home_page.md diff --git a/lessons/locales/da_danish/home_page.md b/lessons/locales/da_danish/home_page.md new file mode 100644 index 00000000..dd1a43d7 --- /dev/null +++ b/lessons/locales/da_danish/home_page.md @@ -0,0 +1,51 @@ +# Home Page + +## Grasshopper + +* Getting Started - What is Linux? Get started with choosing a distribution and installation. + +* Command Line - Learn the fundamentals of the command line, navigating files, directories and more. + +* Text-Fu - Learn basic text manipulation and navigation. + +* Advanced Text-Fu - Navigate text like a Linux spider monkey with vim and emacs. + +* User Management - Learn about user roles and management. + +* Permissions - Learn about permission levels and modifying permissions. + +* Processes - Learn about the running processes on the system. + +* Packages - Learn all about the dpkg, apt-get, rpm and yum package management tools. + +## Journeyman + +* Devices - Learn about Linux devices and how they interact with the kernel and user space. + +* The Filesystem - Learn about the Linux filesystem, the different types of filesystems, partitioning and more. + +* Boot the System - Learn about the stages of the Linux boot process. + +* Kernel - The most important part of the Linux system, learn about how it works and how to configure it. + +* Init - Learn about the different init systems, SysV, Upstart and systemd. + +* Process Utilization - Learn resource monitoring with top, load averages, iostat and more! + +* Logging - Learn about system logs and the /var/log directory. + +## Networking Nomad + +* Network Sharing - Learn about network sharing with rsync, scp, nfs and more. + +* Network Basics - Learn about networking basics and the TCP/IP model. + +* Subnetting - Learn about subnets and how to do subnet arithmetic! + +* Routing - Learn how packets are routed across networks! + +* Network Config - Learn about network configuration using Linux tools! + +* Troubleshooting - Learn about common networking tools to help you diagnose and troubleshoot issues! + +* DNS - Everything and more that you wanted to know about DNS. From cc993383bab13c19fdda20d78de5da6c99c5253d Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 12:33:35 +0200 Subject: [PATCH 03/19] Delete homepage.md --- lessons/locales/da_danish/homepage.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 lessons/locales/da_danish/homepage.md diff --git a/lessons/locales/da_danish/homepage.md b/lessons/locales/da_danish/homepage.md deleted file mode 100644 index 8b137891..00000000 --- a/lessons/locales/da_danish/homepage.md +++ /dev/null @@ -1 +0,0 @@ - From 94f63ea004e85b6b778446f721981bca4d0fbbe2 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 12:52:50 +0200 Subject: [PATCH 04/19] Update home_page.md --- lessons/locales/da_danish/home_page.md | 52 +++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/lessons/locales/da_danish/home_page.md b/lessons/locales/da_danish/home_page.md index dd1a43d7..2822f82f 100644 --- a/lessons/locales/da_danish/home_page.md +++ b/lessons/locales/da_danish/home_page.md @@ -1,51 +1,51 @@ -# Home Page +# Startside -## Grasshopper +## Græshoppe -* Getting Started - What is Linux? Get started with choosing a distribution and installation. +* Kom i gang - Hvad er Linux? Kom i gang med at vælge en distribution og installation. -* Command Line - Learn the fundamentals of the command line, navigating files, directories and more. +* Kommandolinje - Lær grundlæggende elementer i kommandolinjen, navigere filer, mapper og meget mere. -* Text-Fu - Learn basic text manipulation and navigation. +* Tekst-Fu - Lær grundlæggende tekstmanipulation og navigation. -* Advanced Text-Fu - Navigate text like a Linux spider monkey with vim and emacs. +* Avanceret tekst-Fu - Naviger tekst som en Linux-spideraben med vim og emacs. -* User Management - Learn about user roles and management. +* Brugeradministration - Lær om brugerroller og administration. -* Permissions - Learn about permission levels and modifying permissions. +* Tilladelser - Lær om tilladelsesniveauer og ændring af tilladelser. -* Processes - Learn about the running processes on the system. +* Processer - Lær om de kørende processer på systemet. -* Packages - Learn all about the dpkg, apt-get, rpm and yum package management tools. +* Pakker - Lær alt om dpkg, apt-get, rpm og yum pakkehåndteringsværktøjer. -## Journeyman +## Svend -* Devices - Learn about Linux devices and how they interact with the kernel and user space. +* Enheder - Lær om Linux-enheder og hvordan de interagerer med kernen og brugerrummet. -* The Filesystem - Learn about the Linux filesystem, the different types of filesystems, partitioning and more. +* Filsystemet - Lær om Linux-filsystemet, de forskellige typer af filsystemer, partitionering og meget mere. -* Boot the System - Learn about the stages of the Linux boot process. +* Start systemet - Lær om stadierne af Linux-opstartsprocessen. -* Kernel - The most important part of the Linux system, learn about how it works and how to configure it. +* Kerne - Den vigtigste del af Linux-systemet, lære om, hvordan det virker, og hvordan man konfigurerer det. -* Init - Learn about the different init systems, SysV, Upstart and systemd. +* Init - Lær om de forskellige init systemer, SysV, Upstart og systemd. -* Process Utilization - Learn resource monitoring with top, load averages, iostat and more! +* Procesudnyttelse - Lær ressourceovervågning med top, load averages, iostat og meget mere! -* Logging - Learn about system logs and the /var/log directory. +* Logging - Lær om systemlogfiler og /var/log biblioteket. -## Networking Nomad +## Netværks Nomade -* Network Sharing - Learn about network sharing with rsync, scp, nfs and more. +* Netværksdeling - Lær om netværksdeling med rsync, scp, nfs og mere. -* Network Basics - Learn about networking basics and the TCP/IP model. +* Grundlæggende om netværket - Lær grundlæggende om netværk og TCP/IP-modellen. -* Subnetting - Learn about subnets and how to do subnet arithmetic! +* Subnetting - Lær om subnet og hvordan man laver subnet aritmetik! -* Routing - Learn how packets are routed across networks! +* Routing - Lær, hvordan pakker er routeret på tværs af netværk! -* Network Config - Learn about network configuration using Linux tools! +* Network Config - Lær om netværkskonfiguration ved hjælp af Linux-værktøjer! -* Troubleshooting - Learn about common networking tools to help you diagnose and troubleshoot issues! +* Fejlfinding - Lær om almindelige netværksværktøjer til at hjælpe dig med at diagnosticere og fejlfinding af problemer! -* DNS - Everything and more that you wanted to know about DNS. +* DNS - Alt og mere, som du ønskede at vide om DNS. From 561cab770e9a754ff149952c262cefae17b7b359 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 12:55:16 +0200 Subject: [PATCH 05/19] Create fold.md --- lessons/locales/da_danish/access/fold.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 lessons/locales/da_danish/access/fold.md diff --git a/lessons/locales/da_danish/access/fold.md b/lessons/locales/da_danish/access/fold.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/lessons/locales/da_danish/access/fold.md @@ -0,0 +1 @@ + From 3a737f79aec64d4fa9ff2f9d3a7fdcfb7c0a4cd0 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 12:55:45 +0200 Subject: [PATCH 06/19] Add files via upload --- .../da_danish/access/file-permissions.md | 37 ++++++++++++ .../da_danish/access/modifying-permissions.md | 56 +++++++++++++++++++ .../da_danish/access/ownership-permissions.md | 34 +++++++++++ .../da_danish/access/process-permissions.md | 41 ++++++++++++++ .../da_danish/access/setgid-set-group-id.md | 33 +++++++++++ .../da_danish/access/setuid-set-user-id.md | 55 ++++++++++++++++++ .../locales/da_danish/access/sticky-bit.md | 33 +++++++++++ lessons/locales/da_danish/access/umask.md | 29 ++++++++++ 8 files changed, 318 insertions(+) create mode 100644 lessons/locales/da_danish/access/file-permissions.md create mode 100644 lessons/locales/da_danish/access/modifying-permissions.md create mode 100644 lessons/locales/da_danish/access/ownership-permissions.md create mode 100644 lessons/locales/da_danish/access/process-permissions.md create mode 100644 lessons/locales/da_danish/access/setgid-set-group-id.md create mode 100644 lessons/locales/da_danish/access/setuid-set-user-id.md create mode 100644 lessons/locales/da_danish/access/sticky-bit.md create mode 100644 lessons/locales/da_danish/access/umask.md diff --git a/lessons/locales/da_danish/access/file-permissions.md b/lessons/locales/da_danish/access/file-permissions.md new file mode 100644 index 00000000..b6fb170a --- /dev/null +++ b/lessons/locales/da_danish/access/file-permissions.md @@ -0,0 +1,37 @@ +# File Permissions + +## Lesson Content + +As we learned previously, files have different permissions or file modes. Let's look at an example: + +
$ ls -l Desktop/
+drwxr-xr-x 2 pete penguins 4096 Dec 1 11:45 .
+
+ +There are four parts to a file's permissions. The first part is the filetype, which is denoted by the first character in the permissions, in our case since we are looking at a directory it shows d for the filetype. Most commonly you will see a - for a regular file. + +The next three parts of the file mode are the actual permissions. The permissions are grouped into 3 bits each. The first 3 bits are user permissions, then group permissions and then other permissions. I've added the pipe to make it easier to differentiate. + +
d | rwx | r-x | r-x 
+ +Each character represent a different permission: + + +So in the above example, we see that the user pete has read, write and execute permissions on the file. The group penguins has read and execute permissions. And finally, the other users (everyone else) has read and execute permissions. + +## Exercise + +Use the ls -l command on multiple files and recite their permissions, user and group. + +## Quiz Question + +What permission bit is used for executable? + +## Quiz Answer + +x \ No newline at end of file diff --git a/lessons/locales/da_danish/access/modifying-permissions.md b/lessons/locales/da_danish/access/modifying-permissions.md new file mode 100644 index 00000000..4a78cd72 --- /dev/null +++ b/lessons/locales/da_danish/access/modifying-permissions.md @@ -0,0 +1,56 @@ +# Modifying Permissions + +## Lesson Content + +Changing permissions can easily be done with the chmod command. + +First, pick which permission set you want to change, user, group or other. You can add or remove permissions with a + or -, let's look at some examples. + +Adding permission bit on a file +
$ chmod u+x myfile
+ +The above command reads like this: change permission on myfile by adding executable permission bit on the user set. So now the user has executable permission on this file! + +Removing permission bit on a file +
$ chmod u-x myfile
+ +Adding multiple permission bits on a file +
$ chmod ug+w
+ +There is another way to change permissions using numerical format. This method allows you to change permissions all at once. Instead of using r, w, or x to represent permissions, you'll use a numerical representation for a single permission set. So no need to specify the group with g or the user with u. + +The numerical representations are seen below: + + + +Let's look at an example: + +
$ chmod 755 myfile
+ +Can you guess what permissions we are giving this file? Let's break this down, so now 755 covers the permissions for all sets. The first number (7) represents user permissions, the second number (5) represents group permissions and the last 5 represents other permissions. + +Wait a minute, 7 and 5 weren't listed above, where are we getting these numbers? Remember we are combining all the permissions into one number now, so you'll have to get some math involved. + +7 = 4 + 2 + 1, so 7 is the user permissions and it has read, write and execute permissions + +5 = 4 + 1, the group has read and execute permissions + +5 = 4 +1, and all other users have read and execute permissions + +One thing to note: it's not a great idea to be changing permissions nilly willy, you could potentially expose a sensitive file for everyone to modify, however many times you legitimately want to change permissions, just take precaution when using the chmod command. + +## Exercise + +Change some basic text file permissions and see the bits changing as you do an ls -l. + +## Quiz Question + +What number represents the read permission when using numerical format? + +## Quiz Answer + +4 \ No newline at end of file diff --git a/lessons/locales/da_danish/access/ownership-permissions.md b/lessons/locales/da_danish/access/ownership-permissions.md new file mode 100644 index 00000000..423b5407 --- /dev/null +++ b/lessons/locales/da_danish/access/ownership-permissions.md @@ -0,0 +1,34 @@ +# Ownership Permissions + +## Lesson Content + +In addition to modifying permissions on files, you can also modify the group and user ownership of the file as well. + +Modify user ownership + +
$ sudo chown patty myfile
+ +This command will set the owner of myfile to patty. + +Modify group ownership + +
$ sudo chgrp whales myfile
+ +This command will set the group of myfile to whales. + +Modify both user and group ownership at the same time +If you add a colon and groupname after the user you can set both the user and group at the same time. + +
$ sudo chown patty:whales myfile
+ +## Exercise + +Modify the group and user of some test files. Afterwards take a look at the permissions with ls -l. + +## Quiz Question + +What command do you use to change user ownership? + +## Quiz Answer + +chown \ No newline at end of file diff --git a/lessons/locales/da_danish/access/process-permissions.md b/lessons/locales/da_danish/access/process-permissions.md new file mode 100644 index 00000000..2a466c21 --- /dev/null +++ b/lessons/locales/da_danish/access/process-permissions.md @@ -0,0 +1,41 @@ +# Process Permissions + +## Lesson Content + +Let's segway into process permissions for a bit, remember how I told you that when you run the passwd command with the SUID permission bit enabled you will run the program as root? That is true, however does that mean since you are temporarily root you can modify other user's passwords? Nope fortunately not! + +This is because of the many UIDs that Linux implements. There are three UIDS associated with every process: + +When you launch a process, it runs with the same permissions as the user or group that ran it, this is known as an effective user ID. This UID is used to grant access rights to a process. So naturally if Bob ran the touch command, the process would run as him and any files he created would be under his ownership. + +There is another UID, called the real user ID this is the ID of the user that launched the process. These are used to track down who the user who launched the process is. + +One last UID is the saved user ID, this allows a process to switch between the effective UID and real UID, vice versa. This is useful because we don't want our process to run with elevated privileges all the time, it's just good practice to use special privileges at specific times. + +Now let's piece these all together by looking at the passwd command once more. + +When running the passwd command, your effective UID is your user ID, let's say its 500 for now. Oh but wait, remember the passwd command has the SUID permission enabled. So when you run it, your effective UID is now 0 (0 is the UID of root). Now this program can access files as root. + +Let's say you get a little taste of power and you want to modify Sally's password, Sally has a UID of 600. Well you'll be out of luck, fortunately the process also has your real UID in this case 500. It knows that your UID is 500 and therefore you can't modify the password of UID of 600. (This of course is always bypassed if you are a superuser on a machine and can control and change everything). + +Since you ran passwd, it will start the process off using your real UID, and it will save the UID of the owner of the file (effective UID), so you can switch between the two. No need to modify all files with root access if it's not required. + +Most of the time the real UID and the effective UID are the same, but in such cases as the passwd command they will change. + +## Exercise + +We haven't discussed processes yet, we can still take a look at this change happening in real time: + +
    +
  1. Open one terminal window, and run the command: watch -n 1 "ps aux | grep passwd". This will watch for the passwd process.
  2. +
  3. Open a second terminal window and run: passwd
  4. +
  5. Look at the first terminal window, you'll see a process come up for passwd. The first column in the process table is the effective user ID, lo and behold it's the root user!
  6. +
+ +## Quiz Question + +What UID decides what access to grant? + +## Quiz Answer + +effective diff --git a/lessons/locales/da_danish/access/setgid-set-group-id.md b/lessons/locales/da_danish/access/setgid-set-group-id.md new file mode 100644 index 00000000..3ea7d4ef --- /dev/null +++ b/lessons/locales/da_danish/access/setgid-set-group-id.md @@ -0,0 +1,33 @@ +# Setgid + +## Lesson Content + +Similar to the set user ID permission bit, there is a set group ID (SGID) permission bit. This bit allows a program to run as if it was a member of that group. + +Let's look at one example: + +
$ ls -l /usr/bin/wall
+-rwxr-sr-x 1 root tty 19024 Dec 14 11:45 /usr/bin/wall
+
+ +We can see now that the permission bit is in the group permission set. + +Modifying SGID + +
$ sudo chmod g+s myfile
+$ sudo chmod 2555 myfile
+
+ +The numerical representation for SGID is 2. + +## Exercise + +No exercises for this lesson. + +## Quiz Question + +What number represents the SGID? + +## Quiz Answer + +2 \ No newline at end of file diff --git a/lessons/locales/da_danish/access/setuid-set-user-id.md b/lessons/locales/da_danish/access/setuid-set-user-id.md new file mode 100644 index 00000000..c1e5aa19 --- /dev/null +++ b/lessons/locales/da_danish/access/setuid-set-user-id.md @@ -0,0 +1,55 @@ +# Setuid + +## Lesson Content + +There are many cases in which normal users need elevated access to do stuff. The system administrator can't always be there to enter in a root password every time a user needed access to a protected file, so there are special file permission bits to allow this behavior. The Set User ID (SUID) allows a user to run a program as the owner of the program file rather than as themselves. + +Let's look at an example: + +Let's say I want to change my password, simple right? I just use the passwd command: + +
$ passwd
+ +What is the password command doing? It's modifying a couple of files, but most importantly it's modifying the /etc/shadow file. Let's look at that file for a second: + +
$ ls -l /etc/shadow
+
+-rw-r----- 1 root shadow 1134 Dec 1 11:45 /etc/shadow
+
+ +Oh wait a minute here, this file is owned by root? How is it possible that we are able to modify a file owned by root? + +Let's look at another permission set, this time of the command we ran: + +
$ ls -l /usr/bin/passwd
+
+-rwsr-xr-x 1 root root 47032 Dec 1 11:45 /usr/bin/passwd
+
+ +You'll notice a new permission bit here s. This permission bit is the SUID, when a file has this permission set, it allows the users who launched the program to get the file owner's permission as well as execution permission, in this case root. So essentially while a user is running the password command, they are running as root. + +That's why we are able to access a protected file like /etc/shadow when we run the passwd command. Now if you removed that bit, you would see that you will not be able to modify /etc/shadow and therefore change your password. + +Modifying SUID + +Just like regular permissions there are two ways to modify SUID permissions. + +Symbolic way: +
$ sudo chmod u+s myfile
+ +Numerical way: +
 sudo chmod 4755 myfile
+ +As you can see the SUID is denoted by a 4 and pre-pended to the permission set. You may see the SUID denoted as a capital S this means that it still does the same thing, but it does not have execute permissions. + +## Exercise + +Look at the permission for /etc/passwd in detail, do you notice anything else? Files with SUID enabled are also easily distinguishable. + +## Quiz Question + +What number represents the SUID? + +## Quiz Answer + +4 diff --git a/lessons/locales/da_danish/access/sticky-bit.md b/lessons/locales/da_danish/access/sticky-bit.md new file mode 100644 index 00000000..1d9e2189 --- /dev/null +++ b/lessons/locales/da_danish/access/sticky-bit.md @@ -0,0 +1,33 @@ +# The Sticky Bit + +## Lesson Content + +One last special permission bit I want to talk about is the sticky bit. + +This permission bit, "sticks a file/directory" this means that only the owner or the root user can delete or modify the file. This is very useful for shared directories. Take a look at the example below: + +
$ ls -ld /tmp
+drwxrwxrwxt 6 root root 4096 Dec 15 11:45 /tmp
+
+ +You'll see a special permission bit at the end here t, this means everyone can add files, write files, modify files in the /tmp directory, but only root can delete the /tmp directory. + +Modify sticky bit + +
$ sudo chmod +t mydir
+
+$ sudo chmod 1755 mydir
+ +The numerical representation for the sticky bit is 1 + +## Exercise + +What other files and directories do you think have a sticky bit enabled? + +## Quiz Question + +What symbol represents the sticky bit? + +## Quiz Answer + +t \ No newline at end of file diff --git a/lessons/locales/da_danish/access/umask.md b/lessons/locales/da_danish/access/umask.md new file mode 100644 index 00000000..c173a71a --- /dev/null +++ b/lessons/locales/da_danish/access/umask.md @@ -0,0 +1,29 @@ +# Umask + +## Lesson Content + +Every file that gets created comes with a default set of permissions. If you ever wanted to change that default set of permissions, you can do so with the umask command. This command takes the 3 bit permission set we see in numerical permissions. + +Instead of adding these permissions though, umask takes away these permissions. + +
$ umask 021
+ +In the above example, we are stating that we want the default permissions of new files to allow users access to everything, but for groups we want to take away their write permission and for others we want to take away their executable permission. The default umask on most distributions is 022, meaning all user access, but no write access for group and other users. + +When you run the umask command it will give that default set of permissions on any new file you make. However, if you want it to persist you'll have to modify your startup file (.profile), but we'll discuss that in a later lesson. + +## Exercise + +
    +
  1. Create a new file, then note it's permissions.
  2. +
  3. Modify the umask and then create another new file.
  4. +
  5. Check the permissions once more on the new file, what do you expect to see?
  6. +
      + +## Quiz Question + +What command is used to change default file permissions? + +## Quiz Answer + +umask \ No newline at end of file From ca6302e56b094001a0b9244239287cb2853c7b6a Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 12:56:07 +0200 Subject: [PATCH 07/19] Delete fold.md --- lessons/locales/da_danish/access/fold.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 lessons/locales/da_danish/access/fold.md diff --git a/lessons/locales/da_danish/access/fold.md b/lessons/locales/da_danish/access/fold.md deleted file mode 100644 index 8b137891..00000000 --- a/lessons/locales/da_danish/access/fold.md +++ /dev/null @@ -1 +0,0 @@ - From 854d9cefd4e9b774fc80951bae4a37e08ce58166 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 13:01:32 +0200 Subject: [PATCH 08/19] Create status.md --- lessons/locales/da_danish/status.md | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lessons/locales/da_danish/status.md diff --git a/lessons/locales/da_danish/status.md b/lessons/locales/da_danish/status.md new file mode 100644 index 00000000..3798f0f2 --- /dev/null +++ b/lessons/locales/da_danish/status.md @@ -0,0 +1,30 @@ +# Status + +## Finished: +* home_page.md + +## Ongoing: +* Access + +## Not started: +* booting +* command-line +* devices +* dns +* filesystem +* getting-started +* init +* kernel +* logging +* network-configuration +* network-fundamentals +* network-sharing +* network-troubleshooting +* packages +* processes +* process-utilization +* routing +* subnetting +* text-fu +* text-fu advanced +* user-management From 77989fbf28f5ca4b0b2293213df95344efae4fcc Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 13:14:20 +0200 Subject: [PATCH 09/19] Update file-permissions.md --- .../da_danish/access/file-permissions.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lessons/locales/da_danish/access/file-permissions.md b/lessons/locales/da_danish/access/file-permissions.md index b6fb170a..3323012e 100644 --- a/lessons/locales/da_danish/access/file-permissions.md +++ b/lessons/locales/da_danish/access/file-permissions.md @@ -1,37 +1,37 @@ -# File Permissions +# Filtilladelser -## Lesson Content +## Lektionsindhold -As we learned previously, files have different permissions or file modes. Let's look at an example: +Som vi tidligere har lært, har filer forskellige tilladelser eller filtilstande. Lad os se på et eksempel: -
      $ ls -l Desktop/
      -drwxr-xr-x 2 pete penguins 4096 Dec 1 11:45 .
      +
       $ ls -l Desktop/
      +drwxr-xr-x 2 pete pingviner 4096 dec 1 11:45.
       
      -There are four parts to a file's permissions. The first part is the filetype, which is denoted by the first character in the permissions, in our case since we are looking at a directory it shows d for the filetype. Most commonly you will see a - for a regular file. +Der er fire dele til en fils tilladelser. Den første del er filetypen, som betegnes af det første tegn i tilladelserne, da vi ser på en mappe, vises der d for filetypen. Mest almindeligt ser du en - for en almindelig fil. -The next three parts of the file mode are the actual permissions. The permissions are grouped into 3 bits each. The first 3 bits are user permissions, then group permissions and then other permissions. I've added the pipe to make it easier to differentiate. +De næste tre dele af filtilstanden er de faktiske tilladelser. Tilladelserne er grupperet i 3 bits hver. De første 3 bits er brugerrettigheder, derefter gruppetilladelser og derefter andre tilladelser. Jeg har tilføjet røret for at gøre det lettere at differentiere.
      d | rwx | r-x | r-x 
      -Each character represent a different permission: +Hvert tegn repræsenterer en forskellig tilladelse:
        -
      • r: readable
      • -
      • w: writable
      • -
      • x: executable (basically an executable program)
      • -
      • -: empty
      • +
      • r: læsbar
      • +
      • w: skrivbar
      • +
      • x: eksekverbar (stort set et eksekverbart program) +
      • -: tom
      -So in the above example, we see that the user pete has read, write and execute permissions on the file. The group penguins has read and execute permissions. And finally, the other users (everyone else) has read and execute permissions. +Så i ovenstående eksempel ser vi, at brugeren pete har læs, skriv og eksekver tilladelser på filen. Gruppen penguins har læs og eksekver tilladelser. Og til sidst har de andre brugere (alle andre) læs og eksekver tilladelser. -## Exercise +## Øvelse -Use the ls -l command on multiple files and recite their permissions, user and group. +Brug kommandoen ls -l på flere filer og recitér deres tilladelser, bruger og gruppe. -## Quiz Question +## Quiz Spørgsmål -What permission bit is used for executable? +Hvilken tilladelsesbit bruges til eksekverbar? -## Quiz Answer +## Quiz Svar -x \ No newline at end of file +x From fcfaaf8e3407540ddfb7a49b11e8310b6d28aaca Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 13:14:41 +0200 Subject: [PATCH 10/19] Update file-permissions.md --- lessons/locales/da_danish/access/file-permissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessons/locales/da_danish/access/file-permissions.md b/lessons/locales/da_danish/access/file-permissions.md index 3323012e..9d698d51 100644 --- a/lessons/locales/da_danish/access/file-permissions.md +++ b/lessons/locales/da_danish/access/file-permissions.md @@ -4,7 +4,7 @@ Som vi tidligere har lært, har filer forskellige tilladelser eller filtilstande. Lad os se på et eksempel: -
       $ ls -l Desktop/
      +
      $ ls -l Desktop/
       drwxr-xr-x 2 pete pingviner 4096 dec 1 11:45.
       
      From ad3471fed98d2008c75c7266bd2e8f99631f17d5 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 13:15:14 +0200 Subject: [PATCH 11/19] Update file-permissions.md --- lessons/locales/da_danish/access/file-permissions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lessons/locales/da_danish/access/file-permissions.md b/lessons/locales/da_danish/access/file-permissions.md index 9d698d51..01335627 100644 --- a/lessons/locales/da_danish/access/file-permissions.md +++ b/lessons/locales/da_danish/access/file-permissions.md @@ -4,7 +4,8 @@ Som vi tidligere har lært, har filer forskellige tilladelser eller filtilstande. Lad os se på et eksempel: -
      $ ls -l Desktop/
      +
      +$ ls -l Desktop/
       drwxr-xr-x 2 pete pingviner 4096 dec 1 11:45.
       
      From ddc99d0b9dccbbe5f732299eca6118a37a838fbc Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 13:15:47 +0200 Subject: [PATCH 12/19] Update file-permissions.md --- lessons/locales/da_danish/access/file-permissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessons/locales/da_danish/access/file-permissions.md b/lessons/locales/da_danish/access/file-permissions.md index 01335627..99df33c6 100644 --- a/lessons/locales/da_danish/access/file-permissions.md +++ b/lessons/locales/da_danish/access/file-permissions.md @@ -31,7 +31,7 @@ Brug kommandoen ls -l på flere filer og recitér deres tilladelser, bruger og g ## Quiz Spørgsmål -Hvilken tilladelsesbit bruges til eksekverbar? +Hvilken tilladelsesbit bruges for eksekverbar? ## Quiz Svar From 9df267078bfa7db4afdf142f6986779d4f357022 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 13:40:32 +0200 Subject: [PATCH 13/19] Update modifying-permissions.md --- .../da_danish/access/modifying-permissions.md | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/lessons/locales/da_danish/access/modifying-permissions.md b/lessons/locales/da_danish/access/modifying-permissions.md index 4a78cd72..5674d88f 100644 --- a/lessons/locales/da_danish/access/modifying-permissions.md +++ b/lessons/locales/da_danish/access/modifying-permissions.md @@ -1,56 +1,56 @@ -# Modifying Permissions +# Ændring af Tilladelser -## Lesson Content +## Lektionsindhold -Changing permissions can easily be done with the chmod command. +Ændring af tilladelser kan nemt gøres med kommandoen chmod. -First, pick which permission set you want to change, user, group or other. You can add or remove permissions with a + or -, let's look at some examples. +Først skal du vælge hvilken tilladelse du vil ændre, bruger, gruppe eller andre. Du kan tilføje eller fjerne tilladelser med et + eller -, lad os se på nogle eksempler. -Adding permission bit on a file +Tilføjelse af tilladelsesbit på en fil
      $ chmod u+x myfile
      -The above command reads like this: change permission on myfile by adding executable permission bit on the user set. So now the user has executable permission on this file! +Kommandoen ovenfor læses som dette: Skift tilladelse til myfile ved at tilføje eksekverbar tilladelsesbit på brugersættet. Så nu har brugeren eksekverbar tilladelse til denne fil! -Removing permission bit on a file +Fjernelse af tilladelsesbit på en fil
      $ chmod u-x myfile
      -Adding multiple permission bits on a file -
      $ chmod ug+w
      +Tilføjelse af flere tilladelsesbits på en fil +
       $ chmod ug + w 
       
      -There is another way to change permissions using numerical format. This method allows you to change permissions all at once. Instead of using r, w, or x to represent permissions, you'll use a numerical representation for a single permission set. So no need to specify the group with g or the user with u.
      +Der er en anden måde at ændre tilladelser ved hjælp af numerisk format. Denne metode giver dig mulighed for at ændre alle tilladelser på én gang. I stedet for at bruge r, w eller x til at repræsentere tilladelser, bruger du en numerisk repræsentation for et enkelt tilladelsessæt. Så det er ikke nødvendigt at angive gruppen med g eller brugeren med u.
       
      -The numerical representations are seen below:
      +De numeriske repræsentationer ses nedenfor:
       
       
        -
      • 4: read permission
      • -
      • 2: write permission
      • -
      • 1: execute permission
      • +
      • 4: læs tilladelse
      • +
      • 2: skriv tilladelse
      • +
      • 1: eksekver tilladelse
      -Let's look at an example: +Lad os se på et eksempel:
      $ chmod 755 myfile
      -Can you guess what permissions we are giving this file? Let's break this down, so now 755 covers the permissions for all sets. The first number (7) represents user permissions, the second number (5) represents group permissions and the last 5 represents other permissions. +Kan du gætte hvilke tilladelser vi giver denne fil? Lad os bryde det ned, så nu dækker 755 tilladelserne for alle sæt. Det første nummer (7) repræsenterer brugerrettigheder, det andet nummer (5) repræsenterer gruppetilladelser, og de sidste 5 repræsenterer andre tilladelser. -Wait a minute, 7 and 5 weren't listed above, where are we getting these numbers? Remember we are combining all the permissions into one number now, so you'll have to get some math involved. +Vent et øjeblik, 7 og 5 var ikke nævnt ovenfor, hvorfra får vi disse tal? Husk at vi kombinerer alle tilladelserne til et nummer nu, så du bliver nødt til involvere lidt matematik. -7 = 4 + 2 + 1, so 7 is the user permissions and it has read, write and execute permissions +7 = 4 + 2 + 1, så 7 er brugerrettighederne, og den har læs, skriv og eksekver tilladelser -5 = 4 + 1, the group has read and execute permissions +5 = 4 + 1, gruppen har læs og eksekver tilladelser -5 = 4 +1, and all other users have read and execute permissions +5 = 4 +1, og alle andre brugere har læs og eksekver tilladelser -One thing to note: it's not a great idea to be changing permissions nilly willy, you could potentially expose a sensitive file for everyone to modify, however many times you legitimately want to change permissions, just take precaution when using the chmod command. +En ting at bemærke: Det er ikke en god idé at ændre tilladelser nilly willy, du kan potentielt udsætte en følsom fil for alle at ændre, men mange gange vil du legitimt ændre rettigheder, bare tag dine forholdsregler, når du bruger chmod-kommandoen. -## Exercise +## Øvelse -Change some basic text file permissions and see the bits changing as you do an ls -l. +Skift nogle grundlæggende tekstfiltilladelser, og se bitene skifter, som du gør en ls -l. -## Quiz Question +## Quiz Spørgsmål -What number represents the read permission when using numerical format? +Hvilket tal repræsenterer læsetilladelsen, når du bruger numerisk format? -## Quiz Answer +## Quiz Svar -4 \ No newline at end of file +4 From 54e3bba210dd4c61e3f1a721434d908e0caf12bd Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Fri, 29 Jun 2018 13:41:24 +0200 Subject: [PATCH 14/19] Update modifying-permissions.md --- lessons/locales/da_danish/access/modifying-permissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessons/locales/da_danish/access/modifying-permissions.md b/lessons/locales/da_danish/access/modifying-permissions.md index 5674d88f..2709632a 100644 --- a/lessons/locales/da_danish/access/modifying-permissions.md +++ b/lessons/locales/da_danish/access/modifying-permissions.md @@ -15,7 +15,7 @@ Kommandoen ovenfor læses som dette: Skift tilladelse til myfile ved at tilføje
      $ chmod u-x myfile
      Tilføjelse af flere tilladelsesbits på en fil -
       $ chmod ug + w 
      +
       $ chmod ug + w 
      Der er en anden måde at ændre tilladelser ved hjælp af numerisk format. Denne metode giver dig mulighed for at ændre alle tilladelser på én gang. I stedet for at bruge r, w eller x til at repræsentere tilladelser, bruger du en numerisk repræsentation for et enkelt tilladelsessæt. Så det er ikke nødvendigt at angive gruppen med g eller brugeren med u. From 4ed144150a63b20a180756a1d24c762ee56a4b12 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Tue, 3 Jul 2018 17:11:55 +0200 Subject: [PATCH 15/19] Add files via upload --- lessons/locales_config/da.yml | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 lessons/locales_config/da.yml diff --git a/lessons/locales_config/da.yml b/lessons/locales_config/da.yml new file mode 100644 index 00000000..12c4c5de --- /dev/null +++ b/lessons/locales_config/da.yml @@ -0,0 +1,55 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + menu: + languages: + lang: "Language" + flag: "flags/United_States_of_America.png" + home: + tagline: + title: "Learn the ways of Linux-fu, for free." + subscribe: + title: "Subscribe" + body: "Get updates about new courses and lessons!" + about: + title: "About Us" + body: "The knowledge gained here today was powered by the open-source community." + url_name: "Contribute and Collaborate" + url: "https://github.com/cindyq/linuxjourney" + contact: + title: "Contact Us" + body: "See a bug? Any complaints? Just want to send a note?" + url_name: "Let us know" + url: "contact@linuxjourney.com" + courses: + titles: + exercises: "Exercises" + quiz: "Quiz" + forms: + buttons: + check_answer: "Check Answer" + continue: "Continue" + return: "Return to Main Menu" + home: "Home" + messages: + answer_correct: "Correct answer!" + answer_incorrect: "Not quite, try again" \ No newline at end of file From 27c752d28eb78e2ec85158def0626a1eeaf84ada Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Tue, 3 Jul 2018 17:20:58 +0200 Subject: [PATCH 16/19] Update da.yml --- lessons/locales_config/da.yml | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lessons/locales_config/da.yml b/lessons/locales_config/da.yml index 12c4c5de..824f4fe0 100644 --- a/lessons/locales_config/da.yml +++ b/lessons/locales_config/da.yml @@ -19,37 +19,37 @@ # To learn more, please read the Rails Internationalization guide # available at http://guides.rubyonrails.org/i18n.html. -en: +da: menu: languages: - lang: "Language" - flag: "flags/United_States_of_America.png" + lang: "Dansk" + flag: "flags/Denmark.png" home: tagline: - title: "Learn the ways of Linux-fu, for free." + title: "Lær Linux-fu veje, gratis." subscribe: - title: "Subscribe" - body: "Get updates about new courses and lessons!" + title: "Abonner" + body: "Få opdateringer om nye kurser og lektioner!" about: - title: "About Us" - body: "The knowledge gained here today was powered by the open-source community." - url_name: "Contribute and Collaborate" + title: "Om Os" + body: "Den viden der er opnået her i dag var drevet af open-source fællesskabet." + url_name: "Bidrag og Samarbejd" url: "https://github.com/cindyq/linuxjourney" contact: - title: "Contact Us" - body: "See a bug? Any complaints? Just want to send a note?" - url_name: "Let us know" + title: "Kontakt Os" + body: "Ser en bug? Nogle klager? Bare lyst til at sende en note?" + url_name: "Fortæl os" url: "contact@linuxjourney.com" courses: titles: - exercises: "Exercises" + exercises: "Øvelser" quiz: "Quiz" forms: buttons: - check_answer: "Check Answer" - continue: "Continue" - return: "Return to Main Menu" - home: "Home" + check_answer: "Kontroller Svar" + continue: "Forsæt" + return: "Returner til Hovedmenuen" + home: "Hjem" messages: - answer_correct: "Correct answer!" - answer_incorrect: "Not quite, try again" \ No newline at end of file + answer_correct: "Korrekt svar!" + answer_incorrect: "Ikke helt, prøv igen" From a8510db3e80c21a8ca2b5f715fbb6f8110c2f946 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Tue, 3 Jul 2018 17:32:13 +0200 Subject: [PATCH 17/19] Update ownership-permissions.md --- .../da_danish/access/ownership-permissions.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lessons/locales/da_danish/access/ownership-permissions.md b/lessons/locales/da_danish/access/ownership-permissions.md index 423b5407..321d44f1 100644 --- a/lessons/locales/da_danish/access/ownership-permissions.md +++ b/lessons/locales/da_danish/access/ownership-permissions.md @@ -1,34 +1,34 @@ -# Ownership Permissions +# Ejerskabstilladelser -## Lesson Content +## Lektionindhold -In addition to modifying permissions on files, you can also modify the group and user ownership of the file as well. +Ud over at ændre tilladelser på filer, kan du også ændre gruppen og bruger ejerskabet af filen. -Modify user ownership +Rediger brugerejerskab
      $ sudo chown patty myfile
      -This command will set the owner of myfile to patty. +Denne kommando vil sætte ejeren af myfile til patty. -Modify group ownership +Rediger gruppeejerskab
      $ sudo chgrp whales myfile
      -This command will set the group of myfile to whales. +Denne kommando sætter gruppen for myfile til whales. -Modify both user and group ownership at the same time -If you add a colon and groupname after the user you can set both the user and group at the same time. +Rediger både bruger og gruppe ejerskab på samme tid +Hvis du tilføjer et kolon og gruppenavn efter brugeren, kan du indstille både brugeren og gruppen på samme tid. -
      $ sudo chown patty:whales myfile
      +
      $ sudo chown patty:whales myfile
      -## Exercise +## Øvelse -Modify the group and user of some test files. Afterwards take a look at the permissions with ls -l. +Rediger gruppen og brugeren af nogle testfiler. Bagefter tag et kig på tilladelserne med ls -l. -## Quiz Question +## Quiz Spørgsmål -What command do you use to change user ownership? +Hvilken kommando bruger du til at ændre bruger ejerskab? -## Quiz Answer +## Quiz Svar -chown \ No newline at end of file +chown From 61094bce39eba8ce42bfc1b391ce790bc20c76da Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Tue, 3 Jul 2018 17:32:42 +0200 Subject: [PATCH 18/19] Update ownership-permissions.md --- lessons/locales/da_danish/access/ownership-permissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessons/locales/da_danish/access/ownership-permissions.md b/lessons/locales/da_danish/access/ownership-permissions.md index 321d44f1..6c13395b 100644 --- a/lessons/locales/da_danish/access/ownership-permissions.md +++ b/lessons/locales/da_danish/access/ownership-permissions.md @@ -1,6 +1,6 @@ # Ejerskabstilladelser -## Lektionindhold +## Lektionsindhold Ud over at ændre tilladelser på filer, kan du også ændre gruppen og bruger ejerskabet af filen. From 062cedbe7f890b4ea7b720d3ef66767a74bfd991 Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MrMyrmex@users.noreply.github.com> Date: Tue, 3 Jul 2018 17:40:10 +0200 Subject: [PATCH 19/19] Update setgid-set-group-id.md --- .../da_danish/access/setgid-set-group-id.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lessons/locales/da_danish/access/setgid-set-group-id.md b/lessons/locales/da_danish/access/setgid-set-group-id.md index 3ea7d4ef..b5f0ad0a 100644 --- a/lessons/locales/da_danish/access/setgid-set-group-id.md +++ b/lessons/locales/da_danish/access/setgid-set-group-id.md @@ -1,33 +1,33 @@ # Setgid -## Lesson Content +## Lektionsindhold -Similar to the set user ID permission bit, there is a set group ID (SGID) permission bit. This bit allows a program to run as if it was a member of that group. +I lighed med den indstillede bruger ID-tilladelsesbit er der et sæt gruppe-ID (SGID) tilladelsesbit. Denne bit tillader et program at køre som om det var medlem af gruppen. -Let's look at one example: +Lad os se på et eksempel:
      $ ls -l /usr/bin/wall
       -rwxr-sr-x 1 root tty 19024 Dec 14 11:45 /usr/bin/wall
       
      -We can see now that the permission bit is in the group permission set. +Vi kan nu se, at tilladelsesbiten er i gruppens tilladelsessæt. -Modifying SGID +Ændring af SGID
      $ sudo chmod g+s myfile
       $ sudo chmod 2555 myfile
       
      -The numerical representation for SGID is 2. +Den numeriske repræsentation for SGID er 2. -## Exercise +## Øvelse -No exercises for this lesson. +Ingen øvelser til denne lektion. -## Quiz Question +## Quiz Spørgsmål -What number represents the SGID? +Hvilket tal repræsenterer SGID? -## Quiz Answer +## Quiz Svar -2 \ No newline at end of file +2