All cl-quota limits settings are stored in /etc/container/cl-quotas.dat along with the UID or the name of the package the limit was set for.
When saving the limits to a file, the following rules are applied:
•If a limit value is non-integer or non-numeric, then the rules from "Setting limits and integrating with panel packages" section are applied. The assigned value is saved to the file.
•Limits are always saved in pairs, no matter if only one limit was set or both. The pair looks as follows: soft_limit:hard_limit.
•The values 0 and -1, when having a predetermined meaning, are saved as is without any transformations.
•The words “default” and “unlimited” are saved as 0 and -1 respectively.
•If both limits for a user/package were set as 0, then such user/package is not saved in the file, and if it was previously there - it will be removed. Therefore, if a user/package is not mentioned in the file, then all its limits are inherited. See "Limits Inheritance" section.
The lists of panel users, packages, and user-package correspondence are not saved anywhere, this information is always subtracted from the panel.
0 = 1000:2000
500 = -1:-1
958 = 0:20000
pack1 = 5000:-1
It follows that:
•uid=0 limits are set to 1000:2000 - all users in the default package will obtain these limits.
•Both limits are set as unlimited for a user with uid=500, which means that its real limits will always be 0:0. The package limits do not affect this user.
•Soft limit of the user with uid=958 is inherited (0 means inheritance), his hard limit is set to 20000 and it will not depend on the package limits or uid=0 limits.
•Limits 5000:-1 are set for pack1 package, therefore its real limits are: soft_limit=5000 and hard_limit=0 (unlimited).
•The users of pack1 package will get pack1 limits (5000:-1), the users of all the rest of the packages will get the limits of uid=0 because no limits are set for them. Exceptions: uid=500 and 958. uid=500 has both limits set individually, and uid=958 inherits only soft limits.