Quota problems after initial setup


#1

Guys,

I got a new dedi from online and I tried to setup your script myself.
All went ok, but I still have problems with quota, even though I set the server to using / as the primary mount partition and not /home.

[email protected]:~# setdisk
setdisk: command not found
[email protected]:~# setdisk
setdisk: command not found
[email protected]:~# quota
Disk quotas for user root (uid 0): none
[email protected]:~# exit
exit
[email protected]:~$ quota
Disk quotas for user terra (uid 1000): none
[email protected]:~$ setdisk
setdisk: command not found
[email protected]:~$ showspace
34.4MB terra/

Also, ssh don’t work on port 22, only 4747. Is it normal? I setup firewall during setup and blocked public trackers and allowed cloudflare.

Thanks


Quota does not work and disk space error
#2

You must reboot after you install the script. Please confirm you have done this. Also, what Distro and Release are you using.

To gain more data on your issue… what is the output when you type lsblk in ssh?

Port 22 is closed and swapped to port 4747 on install. It is defined in the readme:


#3

Thanks for your quick reply.
Yes, I have rebooted (twice actually).
Thanks for clarifying 4747 port. Doh, sorry I missed that and I DID read the readme.

[email protected]:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 190M 0 part /boot
├─sda2 8:2 0 930.4G 0 part /
└─sda3 8:3 0 976M 0 part [SWAP]
[email protected]:~#


#4

Are you using Hetzner or Kimsufi by chance?

What is the output for /etc/fstab?


#5

Using online.net

/ was on /dev/sda2 during installation

UUID=cfdad7ae-b712-4b7f-a585-bf017b88ee3e / ext4 usrquota,errors=remount-ro 0 1

/boot was on /dev/sda1 during installation

UUID=8b74bb50-1041-4136-b6c9-3b4e976000f5 /boot ext4 defaults 0 2

swap was on /dev/sda3 during installation

UUID=30f86b16-af08-41d6-9f8b-58e40c790500 none swap sw 0 0

Forgot to add, I’m on latest and your suggested ubuntu 16 x64


#6

Yeah, fstab looks good. Weird you’d have the issue with online.net, I test with their machines and have no quandary.

Let’s see. Maybe the mount didn’t set for some reason. Could you copy your /root/.bashrc file and upload it here (just drag and drop it) change it to bashrc.log. There are no sensitive details within this file, it has basic root level system commands etc. Setdisk is one such command.

Also, what is the result of cat /etc/sudoers?


#7

Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Host alias specification

User alias specification

Cmnd alias specification

Cmnd_Alias CLEANMEM = /usr/local/bin/clean_mem, /proc/sys/vm/drop_caches
Cmnd_Alias PACKAGEHANDLE = /usr/local/bin/installpackage-, /usr/local/bin/removepackage-
Cmnd_Alias PLUGINHANDLE = /usr/local/bin/installplugin-, /usr/local/bin/removeplugin-
Cmnd_Alias GENERALCMNDS = /usr/bin/ifstat, /usr/bin/vnstat, /usr/sbin/repquota, /bin/grep, /usr/bin/awk, /usr/bin/reload, /etc/init.d/apache2 restart

User privilege specification

terra ALL=(ALL:ALL) NOPASSWD: ALL
root ALL=(ALL:ALL) ALL
www-data ALL = (ALL) NOPASSWD: CLEANMEM, PACKAGEHANDLE, PLUGINHANDLE, GENERALCMNDS

Members of the admin group may gain root privileges

%admin ALL=(ALL) ALL

Allow members of group sudo to execute any command

%www-data ALL = (ALL) NOPASSWD: CLEANMEM, PACKAGEHANDLE, PLUGINHANDLE, GENERALCMNDS
%sudo ALL=(ALL:ALL) ALL

See sudoers(5) for more information on “#include” directives:

#includedir /etc/sudoers.d

This is bashrc.log bashrc.log (15.8 KB)


#8

I may have to do the setdisk command as an independent function. Try this out:

cd /usr/local/bin
wget https://raw.githubusercontent.com/Swizards/QuickBox/experimental/commands/setdiskspace
dos2unix setdiskspace
chmod +x setdiskspace

Then run setdiskspace to see if you can now set user quotas.


#9

Thank you very much for your assistance @JMSolo!
It works now!


#10

Awesome and thanks for the report. I am going to remove the command from bashrc and make it independent from here on out. This will also spare the reboots needed after script install.


#11

Hey @JMSolo,

Can you please point me to a valid link of
wget https://raw.githubusercontent.com/Swizards/QuickBox/experimental/commands/setdiskspace

I need the quota stuff again for my main box, and as now, it’s not working (im on 2.1.1)

Thanks


#12
cd /usr/local/bin
wget https://raw.githubusercontent.com/QuickBox/quickbox_packages/master/quickbox/system/setdisk
chmod +x setdisk

I am pushing the update script by the end of today. It will restructure old version installs and set them up with the new. This will place you on 2.3.0


#13

So if I run the above commands, my script will be updated to 2.3.0 and quota will work?
That’d be awesome.


#14

No, that will give you the setdisk command. I am pushing the update script by the end of today that will bump you to version 2.3.0 :wink:

I just realized the way I said that was incredibly confusing…


#15

Awesome news!! Thank you very much!


#16

[[email protected]]:(55.9Mb)/usr/local/bin# chmod +x setdisk [[email protected]]:(55.9Mb)/usr/local/bin# setdisk Username: nostyler Quota size for user: (EX: 500GB): 300GB The program 'setquota' is currently not installed. You can install it by typing: apt install quota [[email protected]]:(55.9Mb)/usr/local/bin#


#17

:confounded: Ok, I can’t wait to get this upgrade script completed as all this nonsense is gone.

Install quota with that command it threw you. Then we’ll run the mount again. If you are using a /(root) partition then do the following:

quotaoff -a
service quota stop
mount -o remount /
quotacheck -auMF vfsv1
quotaon -uv /
service quota start

Then run setdisk again to set the quota.


#18

I’d better wait for you to push it.
ATM it gives this error:

[email protected]:~$ sudo bash [[email protected]]:(70.8kb)~# quotaoff -a The program 'quotaoff' is currently not installed. You can install it by typing: apt install quota [[email protected]]:(70.8kb)~#


#19

Did you install quota as it suggested? apt install quota


#20

Oops, my bad. I installed it.
This is the thrown error:

[[email protected]]:(70.8kb)~# quotaoff -a [[email protected]]:(70.8kb)~# service quota stop [[email protected]]:(70.8kb)~# mount -o remount / [[email protected]]:(70.8kb)~# quotacheck -auMF vfsv1 [[email protected]]:(70.8kb)~# quotaon -uv / quotaon: Mountpoint (or device) / not found or has no quota enabled. [[email protected]]:(70.8kb)~# quotaon -uv / quotaon: Mountpoint (or device) / not found or has no quota enabled. [[email protected]]:(70.8kb)~#