From 12e828f9d259fe3122702bac0ce454baa3c74c53 Mon Sep 17 00:00:00 2001 From: benny Vasquez Date: Tue, 10 Sep 2024 18:32:07 -0400 Subject: [PATCH 1/9] new guide --- docs/.vuepress/config.js | 7 + docs/beginners/README.md | 18 +++ docs/beginners/file-and-folder-permissions.md | 127 ++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 docs/beginners/README.md create mode 100644 docs/beginners/file-and-folder-permissions.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 2291b7dc8..9c38f77fd 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -154,6 +154,13 @@ module.exports = { '/Comparison', '/FAQ', '/Howto', + { + title: 'Beginner Series', + path: '/beginners/', + children: [ + '/beginners/file-and-folder-permissions', + ] + }, { title: 'openQA Guide', path: '/development/openQA', diff --git a/docs/beginners/README.md b/docs/beginners/README.md new file mode 100644 index 000000000..f77b481f6 --- /dev/null +++ b/docs/beginners/README.md @@ -0,0 +1,18 @@ +--- +title: 'Beginner series' +--- +###### last updated: 2024-09-10 + +# Beginner Series! + +Many new users come to Linux every day, and using AlmaLinux for the first time should be as simple as possible! This serie attempts to explain some of the base level conecepts in simple language so new users won't get immediately overwhelmed. + +- [File and Folder Permissions on AlmaLinux](file-and-folder-permissions.md) + + +# Up next! + +Once you've completed these guides, take a look at any of the other guides that interest you! + +- [Nginx - from beginning to configured!](/series/nginx/) +- [AlmaLinux System Series - various ways to interact with your AlmaLinux environment](/series/system/) \ No newline at end of file diff --git a/docs/beginners/file-and-folder-permissions.md b/docs/beginners/file-and-folder-permissions.md new file mode 100644 index 000000000..f5a1c4fbe --- /dev/null +++ b/docs/beginners/file-and-folder-permissions.md @@ -0,0 +1,127 @@ +--- +title: "AlmaLinux After-Installation Guide" +--- +
+ +| 💡 | Experience Level | ⭐☆☆☆☆ | +|--- | --------- | --------| +###### last updated: 2024-09-10 + +## Introduction + +By design, Linux has several layers of security, from the kernel all the way up to user-facing applications. One of those layers is file and folder permissions. Since the very beginning of Linux, those permissions have been a crucial aspect of security. + +And because Linux is a multi-user operating system, file and folder permissions become even more important. Think about it this way: If any user on a Linux system could access any file or folder owned by another user, security and privacy would be a problem. Because of that, Linux uses a system of permissions and ownership.  + +## Fundamental Concepts + +There are two different methods for changing folder and file permissions on Linux: + +- absolute - which requires users to know the numeric number associated with each permission. +- symbolic - which only requires the use of letters associated with users (user, group, and other)  and permissions (such as read, write, and execute).  + +## Key Takeaways + +To understand file and folder permission, there are three different types of owners: + +- User - the user who is the primary owner of a file or folder. +- Group - any user who's part of a group with access to a file or folder. +- Other - anyone with access to the system. + +There are also three different types of permissions: + +- Read - a user can view and/or copy the contents of a file. +- Write - a user can modify the contents of a file. +- Execute - a user can run the file (if it's an executable app or script). + +The above permissions hold true for both files and folders. + +If you issue the command ls -l within a directory, you'll see all of your files/folders listed along with their permissions. A typical entry might look like this: + +`-rw-rw-r--  1 jackuser jackgroup 0 Jul 16 13:04 testfile` + +Here's the breakdown of that listing: + +* - - the file type +* rw-rw-r-- - the permissions +* 1 - number of hard links +* jack - owner +* jack - group +* 0 - file size +* July 16 13:04 - modification timestamp +* testfile - the filename + +What we want to focus on is the permissions. In our example that's `rw-rw-r--`. How this breaks down is simple. The permissions section is broken into three sections: owner, group, and other, each of which can have read (r), write (w), and/or execute (x) permissions. So our example breaks down like this: + +- owner has read and write permissions. +- group has read and write permissions. +- other has read permissions. + +If you see a `-` character, it means there are no permissions set for that. If the file had full permissions for all users, it would look like this: + +`rwxrwxrwx` + +So, `rwx` for owner, `rwx` for group, and `rwx` for other. + +The question now is, how do we change that? With the chmod command, which has two different modes: absolute and symbolic. The easiest method is symbolic. Why? With absolute mode, you have to remember the following: + +- read permission = 4 +- write permission = 2 +- execute permission = 1 +- no permission = 0 + +To change the permission in absolute mode, you add the permissions you want for each group. For example, if you want owner to have `rwx` permission, the total is 7. If you wanted group to have read and write permission, the total is 6, if you wanted to give other only read permission, the total is 4. String them together and you get 764. To make that change, the command would be: + +`chmod 764 testfile` + +For those who don't want to worry about memorizing the value assigned to each permission, you can use the symbolic method. To use this method, you have to assign by group, which (if you'll remember) are (u)ser, (g)roup, and (o)ther. + +Let's say you want to give the 764 permission to the `testfile` file, using symbolic method. To do that, we'll first change the permission for owner with: + +`chmod u+rwx testfile` + +Next, we assign the rw permission to group with: + +`chmod g+rw testfile` + +Finally, we set the permissions for other with: + +`chmod o+r testfile` + +You could also use - to remove permissions. For example, if you want to remove group write permissions from the file, that command would be: + +`chmod g-w testfile` + +You can also change the permissions for certain or all groups at once. Say you want to give user and group read/write permissions. That could be achieved with: + +`chmod ug+rw testfile` + +If you accidentally give both group and other executable permissions, you could strip it with: + +`chmod go-x testfile` + +You could also string them together like this: + +`chmod ug+rw, o-x testfile` + +One final option is a for all. You could give all users read permission to a file with: + +`chmod a+r testfile` + +But what about folders? It's done the same way, the only difference being that you have the ability to not just change the permissions of the folder but all sub-folders and files within the folder. If you have the folder PROJECT1 and you wanted to give read and write permissions for group to everything within the folder, the command would use the -R (recursive) option like so: + +`chmod -R ug+rw PROJECT1` + +Finally, there's ownership. Every file on a Linux system has both a user and a group ownership. Remember, in our example above, both the user and owner were listed as jack. What if you had a group on your system, called dev1 and you want to change the group ownership to that? Thanks to the chown command, it's very simple: + +`chown :dev1 testfile` + +Notice dev1 is on the right side of the : character. That's because ownership is listed as user:group. If you wanted to change just the user ownership, the command would be something like this: + +`chown olivia: testfile` + +The above command would change the user ownership to olivia. If you want to change both user and group ownership, the command could be: + +`chown olivia:dev1 testfile` + +And that is the basics of file and folder permissions in AlmaLinux. This skill will come in very handy throughout your career as a Linux user or admin. \ No newline at end of file From b5c57784569eb09e7d21c711bdee675bd47365e7 Mon Sep 17 00:00:00 2001 From: benny Vasquez Date: Tue, 10 Sep 2024 19:18:00 -0400 Subject: [PATCH 2/9] fixing the title --- docs/beginners/file-and-folder-permissions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/beginners/file-and-folder-permissions.md b/docs/beginners/file-and-folder-permissions.md index f5a1c4fbe..8f4183e43 100644 --- a/docs/beginners/file-and-folder-permissions.md +++ b/docs/beginners/file-and-folder-permissions.md @@ -1,5 +1,5 @@ --- -title: "AlmaLinux After-Installation Guide" +title: "File and Folder Permissions" ---
@@ -7,7 +7,7 @@ title: "AlmaLinux After-Installation Guide" |--- | --------- | --------| ###### last updated: 2024-09-10 -## Introduction +# Introduction By design, Linux has several layers of security, from the kernel all the way up to user-facing applications. One of those layers is file and folder permissions. Since the very beginning of Linux, those permissions have been a crucial aspect of security. From ec3c1d45565c3d4bfeae65b8e2beb188f67ed820 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 22:34:42 +0000 Subject: [PATCH 3/9] Apply Prettier format --- docs/.vuepress/config.js | 86 +++++++++---------- docs/beginners/README.md | 10 +-- docs/beginners/file-and-folder-permissions.md | 54 ++++++------ 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index b2ee9c2dc..474836526 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -143,52 +143,50 @@ module.exports = { title: "Contribute", path: "/Contribute", children: [ - '/Comparison', - '/FAQ', - '/Howto', - { - title: 'Beginner Series', - path: '/beginners/', + "/Comparison", + "/FAQ", + "/Howto", + { + title: "Beginner Series", + path: "/beginners/", + children: ["/beginners/file-and-folder-permissions"], + }, + { + title: "openQA Guide", + path: "/development/openQA", + }, + { + title: "Howto Series", + path: "/series/", + children: [ + "/series/LAMP-server", + { + title: "Nginx Series", + path: "/series/nginx/", children: [ - '/beginners/file-and-folder-permissions', - ] - }, - { - title: 'openQA Guide', - path: '/development/openQA', - }, - { - title: 'Howto Series', - path: '/series/', + "/series/nginx/NginxSeriesA01", + "/series/nginx/NginxSeriesA02R8", + "/series/nginx/NginxSeriesA02R91", + "/series/nginx/NginxSeriesA02R92", + "/series/nginx/NginxSeriesA03", + "/series/nginx/NginxSeriesA04P1", + ], + }, + { + title: "System Series", + path: "/series/system/", children: [ - '/series/LAMP-server', - { - title: "Nginx Series", - path: '/series/nginx/', - children: [ - '/series/nginx/NginxSeriesA01', - '/series/nginx/NginxSeriesA02R8', - '/series/nginx/NginxSeriesA02R91', - '/series/nginx/NginxSeriesA02R92', - '/series/nginx/NginxSeriesA03', - '/series/nginx/NginxSeriesA04P1', - ] - }, - { - title: "System Series", - path: '/series/system/', - children: [ - '/series/system/SystemSeriesA01', - '/series/system/SystemSeriesA02', - '/series/system/SystemSeriesA03', - '/series/system/SystemSeriesA03R8', - '/series/system/SystemSeriesA03R9', - '/series/system/SystemSeriesA04', - '/series/system/SystemSeriesA05', - ] - }, - ] - }, + "/series/system/SystemSeriesA01", + "/series/system/SystemSeriesA02", + "/series/system/SystemSeriesA03", + "/series/system/SystemSeriesA03R8", + "/series/system/SystemSeriesA03R9", + "/series/system/SystemSeriesA04", + "/series/system/SystemSeriesA05", + ], + }, + ], + }, "/Contribute", "/Contribute-to-AlmaLinux-Build-System", "/Contribute-to-Documentation", diff --git a/docs/beginners/README.md b/docs/beginners/README.md index f77b481f6..db5883aa3 100644 --- a/docs/beginners/README.md +++ b/docs/beginners/README.md @@ -1,18 +1,18 @@ --- -title: 'Beginner series' +title: "Beginner series" --- + ###### last updated: 2024-09-10 # Beginner Series! -Many new users come to Linux every day, and using AlmaLinux for the first time should be as simple as possible! This serie attempts to explain some of the base level conecepts in simple language so new users won't get immediately overwhelmed. - -- [File and Folder Permissions on AlmaLinux](file-and-folder-permissions.md) +Many new users come to Linux every day, and using AlmaLinux for the first time should be as simple as possible! This serie attempts to explain some of the base level conecepts in simple language so new users won't get immediately overwhelmed. +- [File and Folder Permissions on AlmaLinux](file-and-folder-permissions.md) # Up next! Once you've completed these guides, take a look at any of the other guides that interest you! - [Nginx - from beginning to configured!](/series/nginx/) -- [AlmaLinux System Series - various ways to interact with your AlmaLinux environment](/series/system/) \ No newline at end of file +- [AlmaLinux System Series - various ways to interact with your AlmaLinux environment](/series/system/) diff --git a/docs/beginners/file-and-folder-permissions.md b/docs/beginners/file-and-folder-permissions.md index 8f4183e43..672b75c81 100644 --- a/docs/beginners/file-and-folder-permissions.md +++ b/docs/beginners/file-and-folder-permissions.md @@ -1,10 +1,12 @@ --- title: "File and Folder Permissions" --- +
-| 💡 | Experience Level | ⭐☆☆☆☆ | -|--- | --------- | --------| +| 💡 | Experience Level | ⭐☆☆☆☆ | +| --- | ---------------- | ------ | + ###### last updated: 2024-09-10 # Introduction @@ -17,22 +19,22 @@ And because Linux is a multi-user operating system, file and folder permissions There are two different methods for changing folder and file permissions on Linux: -- absolute - which requires users to know the numeric number associated with each permission. -- symbolic - which only requires the use of letters associated with users (user, group, and other)  and permissions (such as read, write, and execute).  +- absolute - which requires users to know the numeric number associated with each permission. +- symbolic - which only requires the use of letters associated with users (user, group, and other)  and permissions (such as read, write, and execute).  ## Key Takeaways To understand file and folder permission, there are three different types of owners: -- User - the user who is the primary owner of a file or folder. -- Group - any user who's part of a group with access to a file or folder. -- Other - anyone with access to the system. +- User - the user who is the primary owner of a file or folder. +- Group - any user who's part of a group with access to a file or folder. +- Other - anyone with access to the system. There are also three different types of permissions: -- Read - a user can view and/or copy the contents of a file. -- Write - a user can modify the contents of a file. -- Execute - a user can run the file (if it's an executable app or script). +- Read - a user can view and/or copy the contents of a file. +- Write - a user can modify the contents of a file. +- Execute - a user can run the file (if it's an executable app or script). The above permissions hold true for both files and folders. @@ -42,20 +44,20 @@ If you issue the command ls -l within a directory, you'll see all of your files/ Here's the breakdown of that listing: -* - - the file type -* rw-rw-r-- - the permissions -* 1 - number of hard links -* jack - owner -* jack - group -* 0 - file size -* July 16 13:04 - modification timestamp -* testfile - the filename +- - - the file type +- rw-rw-r-- - the permissions +- 1 - number of hard links +- jack - owner +- jack - group +- 0 - file size +- July 16 13:04 - modification timestamp +- testfile - the filename What we want to focus on is the permissions. In our example that's `rw-rw-r--`. How this breaks down is simple. The permissions section is broken into three sections: owner, group, and other, each of which can have read (r), write (w), and/or execute (x) permissions. So our example breaks down like this: -- owner has read and write permissions. -- group has read and write permissions. -- other has read permissions. +- owner has read and write permissions. +- group has read and write permissions. +- other has read permissions. If you see a `-` character, it means there are no permissions set for that. If the file had full permissions for all users, it would look like this: @@ -65,10 +67,10 @@ So, `rwx` for owner, `rwx` for group, and `rwx` for other. The question now is, how do we change that? With the chmod command, which has two different modes: absolute and symbolic. The easiest method is symbolic. Why? With absolute mode, you have to remember the following: -- read permission = 4 -- write permission = 2 -- execute permission = 1 -- no permission = 0 +- read permission = 4 +- write permission = 2 +- execute permission = 1 +- no permission = 0 To change the permission in absolute mode, you add the permissions you want for each group. For example, if you want owner to have `rwx` permission, the total is 7. If you wanted group to have read and write permission, the total is 6, if you wanted to give other only read permission, the total is 4. String them together and you get 764. To make that change, the command would be: @@ -124,4 +126,4 @@ The above command would change the user ownership to olivia. If you want to chan `chown olivia:dev1 testfile` -And that is the basics of file and folder permissions in AlmaLinux. This skill will come in very handy throughout your career as a Linux user or admin. \ No newline at end of file +And that is the basics of file and folder permissions in AlmaLinux. This skill will come in very handy throughout your career as a Linux user or admin. From 465b65e83ea7b5e813a049e6d66a413ed22d49dc Mon Sep 17 00:00:00 2001 From: benny Vasquez Date: Mon, 1 Dec 2025 17:38:16 -0500 Subject: [PATCH 4/9] resolving conflict in the menu - reverting to master --- docs/.vuepress/config.js | 46 +--------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 474836526..711effb1b 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -143,50 +143,6 @@ module.exports = { title: "Contribute", path: "/Contribute", children: [ - "/Comparison", - "/FAQ", - "/Howto", - { - title: "Beginner Series", - path: "/beginners/", - children: ["/beginners/file-and-folder-permissions"], - }, - { - title: "openQA Guide", - path: "/development/openQA", - }, - { - title: "Howto Series", - path: "/series/", - children: [ - "/series/LAMP-server", - { - title: "Nginx Series", - path: "/series/nginx/", - children: [ - "/series/nginx/NginxSeriesA01", - "/series/nginx/NginxSeriesA02R8", - "/series/nginx/NginxSeriesA02R91", - "/series/nginx/NginxSeriesA02R92", - "/series/nginx/NginxSeriesA03", - "/series/nginx/NginxSeriesA04P1", - ], - }, - { - title: "System Series", - path: "/series/system/", - children: [ - "/series/system/SystemSeriesA01", - "/series/system/SystemSeriesA02", - "/series/system/SystemSeriesA03", - "/series/system/SystemSeriesA03R8", - "/series/system/SystemSeriesA03R9", - "/series/system/SystemSeriesA04", - "/series/system/SystemSeriesA05", - ], - }, - ], - }, "/Contribute", "/Contribute-to-AlmaLinux-Build-System", "/Contribute-to-Documentation", @@ -405,4 +361,4 @@ module.exports = { // disabled it to avoid confusion editLinks: false, }, -}; +}; \ No newline at end of file From 86615463ed8ad55ca43b9f0e804d73909fc88f16 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 22:39:20 +0000 Subject: [PATCH 5/9] Apply Prettier format --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 711effb1b..d93778921 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -361,4 +361,4 @@ module.exports = { // disabled it to avoid confusion editLinks: false, }, -}; \ No newline at end of file +}; From 9b5b34249b7ed9edb73be6ff257a56d242ad4cbf Mon Sep 17 00:00:00 2001 From: benny Vasquez Date: Mon, 1 Dec 2025 17:39:30 -0500 Subject: [PATCH 6/9] adding link to the new page again --- docs/.vuepress/config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index d93778921..5996a2ba5 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -199,7 +199,12 @@ module.exports = { "/Comparison", "/documentation/nvidia", "/FAQ", - "/Howto", + "/Howto", + { + title: "Beginner Series", + path: "/beginners/", + children: ["/beginners/file-and-folder-permissions"], + }, { title: "openQA Guide", path: "/development/openQA", From 71e9508a38354ecfe373e018708a5d7e21185575 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 22:41:47 +0000 Subject: [PATCH 7/9] Apply Prettier format --- docs/.vuepress/config.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 5996a2ba5..4d3d1bc13 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -199,12 +199,12 @@ module.exports = { "/Comparison", "/documentation/nvidia", "/FAQ", - "/Howto", - { - title: "Beginner Series", - path: "/beginners/", - children: ["/beginners/file-and-folder-permissions"], - }, + "/Howto", + { + title: "Beginner Series", + path: "/beginners/", + children: ["/beginners/file-and-folder-permissions"], + }, { title: "openQA Guide", path: "/development/openQA", From b1a5fe262ba548bb48525f73bda9d835f123236a Mon Sep 17 00:00:00 2001 From: benny Vasquez Date: Mon, 1 Dec 2025 17:48:38 -0500 Subject: [PATCH 8/9] Update file-and-folder-permissions.md removed old formatting --- docs/beginners/file-and-folder-permissions.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/beginners/file-and-folder-permissions.md b/docs/beginners/file-and-folder-permissions.md index 672b75c81..2278b2124 100644 --- a/docs/beginners/file-and-folder-permissions.md +++ b/docs/beginners/file-and-folder-permissions.md @@ -2,12 +2,6 @@ title: "File and Folder Permissions" --- -
- -| 💡 | Experience Level | ⭐☆☆☆☆ | -| --- | ---------------- | ------ | - -###### last updated: 2024-09-10 # Introduction From 4e245870a0409c323d5c7d1cb8084fe6082f48d1 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 22:49:10 +0000 Subject: [PATCH 9/9] Apply Prettier format --- docs/beginners/file-and-folder-permissions.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/beginners/file-and-folder-permissions.md b/docs/beginners/file-and-folder-permissions.md index 2278b2124..0fb4cf350 100644 --- a/docs/beginners/file-and-folder-permissions.md +++ b/docs/beginners/file-and-folder-permissions.md @@ -2,7 +2,6 @@ title: "File and Folder Permissions" --- - # Introduction By design, Linux has several layers of security, from the kernel all the way up to user-facing applications. One of those layers is file and folder permissions. Since the very beginning of Linux, those permissions have been a crucial aspect of security.