Skip to content

Commit 7314226

Browse files
committed
added linux
1 parent 0f4d59f commit 7314226

12 files changed

+229
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# How do REST and MQTT differ in real-time communication?
2+
3+
- REST: stateless, client-server model, suitable for CRUD APIs.
4+
5+
- MQTT: lightweight pub/sub protocol, ideal for real-time, low-bandwidth environments like IoT.
6+
7+
Use MQTT when low latency and continuous messaging are needed, e.g., sensors or real-time device updates.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# How would you deploy a Node.js app using AWS services?
2+
3+
- Use EC2 for hosting, or Lambda for serverless.
4+
- Store data in DynamoDB or RDS.
5+
- Use ALB/ELB for load balancing.
6+
- Use CloudWatch for logging and monitoring.
7+
- Automate with CloudFormation or CDK.

interview-guides/git/01-fork-vs-clone.md

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# How would you secure an MQTT connection?
2+
3+
- Use TLS to encrypt traffic.
4+
- Implement authentication (username/password or token).
5+
- Set ACLs (Access Control Lists) for topic-level permissions.
6+
- Deploy behind reverse proxy with rate-limiting.

linux/01.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Create a Custom Apache User
2+
3+
> Create a user named `moyna` and Assign a unique UID `1949` and designate the home directory as `/var/www/moyna`.
4+
5+
<details>
6+
<summary> Solution </summary>
7+
8+
sudo adduser -d /var/www/moyna -u 1949 moyna
9+
10+
</details>

linux/02.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Execute Permission
2+
3+
After conducting a security audit within the Stratos DC, the Nautilus security team discovered misconfigured permissions on critical files. To address this, corrective actions are being taken by the production support team. Specifically, the file named /etc/resolv.conf on Nautilus App 2 server requires adjustments to its Access Control Lists (ACLs) as follows:
4+
5+
1. The file's user owner and group owner should be set to root.
6+
2. Others should possess read only permissions on the file.
7+
3. User mark must not have any permissions on the file.
8+
4. User eric should be granted read only permission on the file.
9+
10+
## Steps
11+
12+
1. Login into App server
13+
2. Set owner and group to `root`:
14+
15+
```sh
16+
sudo chown root:root /etc/resolv.conf
17+
```
18+
19+
3. Set others `read only`:
20+
21+
```sh
22+
sudo chmod o=r /etc/resolv.conf
23+
```
24+
25+
4. Remove all permission for user `mark`
26+
27+
```sh
28+
sudo setfacl -m u:mark:--- /etc/resolv.conf
29+
```
30+
31+
5. Give user `eric` read-only permission:
32+
33+
```sh
34+
sudo setfacl -m u:eric:r-- /etc/resolv.conf
35+
```
36+
37+
6. Verify Results:
38+
39+
```sh
40+
ls -la /etc/resolv.conf
41+
getfacl /etc/resolv.conf
42+
```
43+
44+
```shell
45+
[root@stapp02 ~]# ls -la /etc/resolv.conf
46+
getfacl /etc/resolv.conf
47+
-rw-r--r--+ 1 root root 69 Aug 11 05:26 /etc/resolv.conf
48+
getfacl: Removing leading '/' from absolute path names
49+
# file: etc/resolv.conf
50+
# owner: root
51+
# group: root
52+
user::rw-
53+
user:mark:---
54+
user:eric:r--
55+
group::r--
56+
mask::r--
57+
other::r--
58+
```

projects/terraform/aws/main.tf

Whitespace-only changes.

projects/terraform/aws/outputs.tf

Whitespace-only changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
terraform {
2+
backend "remote" {
3+
workspaces {
4+
name = ""
5+
}
6+
7+
organization = "value"
8+
}
9+
10+
required_version = "1.12.1"
11+
12+
required_providers {
13+
aws = {
14+
source = "hashicorp/aws"
15+
version = "6.2.0"
16+
}
17+
}
18+
19+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
variable "region" {
3+
default = "ap-southeast-1"
4+
}
5+
6+
variable "instance_type" {
7+
default = "t3.small"
8+
}
9+
10+
variable "ssh-key" {
11+
12+
13+
}

0 commit comments

Comments
 (0)