command-line-murders/i-0970c55eac23201c8
by SadServersMore by SadServers
Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for admin: Sorry, try again. [sudo] password for admin: Sorry, try again. [sudo] password for admin: sudo: 3 incorrect password attempts admin@i-04da8860b0762f714:~$ su Password:
paris/i-04da8860b0762f714 02:47
by SadServersnewfstatat(AT_FDCWD, "/usr/sbin/fallocate", 0xc000012d38, 0) = -1 ENOENT (No sucnewfstatat(AT_FDCWD, "/usr/bin/fallocate", {st_mode=S_IFREG|0755, st_size=35048,openat(AT_FDCWD, "/dev/null", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/dev/null", O_WRONLY|O_CLOEXEC) = 7 openat(AT_FDCWD, "/dev/null", O_WRONLY|O_CLOEXEC) = 8 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=698, si_uid=1000, si_sme=0} --- unlinkat(AT_FDCWD, "/home/admin/data/newdatafile", 0) = 0 panic: exit status 1 goroutine 1 [running]: main.main() ./main.go:64 +0x47d +++ exited with 2 +++ admin@i-048eed74781c3e02b:~$ strace -e trace=file ./kihei
kihei/i-048eed74781c3e02b 00:23
by SadServersopenat(AT_FDCWD, "/home/admin/webserver.py", O_RDONLY|O_CLOEXEC) = -1 EACCES (Pestat("/home/admin/webserver.py", {st_mode=S_IFREG|0770, st_size=360, ...}) = 0 readlink("/home/admin/webserver.py", 0x7ffcd0b15d90, 4096) = -1 EINVAL (Invalid lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/home/admin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/home/admin/webserver.py", {st_mode=S_IFREG|0770, st_size=360, ...}) = 0 openat(AT_FDCWD, "/home/admin/webserver.py", O_RDONLY) = -1 EACCES (Permission dwrite(2, "python3: can't open file '/home/"..., 82python3: can't open file '/homrrno 13] Permission denied ) = 82 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_r{sa_handler=0x6402c0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f1915bdf1exit_group(2) = ? +++ exited with 2 +++ admin@i-0c85c5a418bb83a0e:/etc/systemd/system$ strace python3 /home/admin/webser
paris/i-0c85c5a418bb83a0e 02:08
by SadServers[Unit] Description=Flask Application After=network.target [Service] ExecStart=/usr/bin/python3 /home/admin/webserver.py [Install] WantedBy=multi-user.target admin@i-031b3c138eab9863b:~$ ls -la/etc/systemd/system/flaskapp.service ls: invalid option -- '/' Try 'ls --help' for more information. admin@i-031b3c138eab9863b:~$ ls -la /etc/systemd/system/flaskapp.service -rw-r--r-- 1 root root 159 Sep 24 2023 /etc/systemd/system/flaskapp.service admin@i-031b3c138eab9863b:~$