From 968672c091199f25260e6912d3bb3d484f53efe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega=20Froysa?= Date: Mon, 14 Nov 2022 15:36:56 +0100 Subject: [PATCH] Add SRI notes. --- 2/SRI/notes/ftp-server.txt | 8 ++++++++ 2/SRI/notes/quotas.txt | 13 +++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 2/SRI/notes/ftp-server.txt create mode 100644 2/SRI/notes/quotas.txt diff --git a/2/SRI/notes/ftp-server.txt b/2/SRI/notes/ftp-server.txt new file mode 100644 index 0000000..59c4c49 --- /dev/null +++ b/2/SRI/notes/ftp-server.txt @@ -0,0 +1,8 @@ +apt install proftpd ftp +id ftp +ftpasswd --passwd --name admin --home /srv/ftp --uid 124 \ + --shell /bin/false --file /etc/proftpd/passwd.virtual + +# In /etc/proftpd/proftpd.conf +AuthUserFile /etc/proftpd/passwd.virtual + RequireValidShell off diff --git a/2/SRI/notes/quotas.txt b/2/SRI/notes/quotas.txt new file mode 100644 index 0000000..f641684 --- /dev/null +++ b/2/SRI/notes/quotas.txt @@ -0,0 +1,13 @@ +apt install quotas +find /lib/modules/`uname -r` -type f -name '*quota_v*.ko*' + +# In /etc/fstab: +s/errors=remount-ro/usrquota,grpquota/ +s/1$/0/ + +quotacheck -cugm / +quotaon -ugv / +quotaoff -ugv / +setquota -u user block-soft block-hard inode-soft inode-hard / +# list all quotas +repquota -a