Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Limit disk space available to a user

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
LinuxOS
Posts: 52
Joined: 2022-07-31 01:46
Has thanked: 27 times
Been thanked: 3 times

[Solved] Limit disk space available to a user

#1 Post by LinuxOS »

Hi. After reading about malicious zip archives that can fill an entire disk drive after being extracted.
https://en.wikipedia.org/wiki/Zip_bomb
I decided to create a user to deal with untrusted files received from other users.
I need that user's home directory to be limited to maximum of 2 GiB of disk space.
Is it possible to set this restriction and how can I do it?
Thanks.
Last edited by LinuxOS on 2023-02-04 20:01, edited 1 time in total.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Limit disk space available to a user

#2 Post by p.H »

With quotas or a user home directory in a separate filesystem.

User avatar
LinuxOS
Posts: 52
Joined: 2022-07-31 01:46
Has thanked: 27 times
Been thanked: 3 times

Re: Limit disk space available to a user

#3 Post by LinuxOS »

p.H wrote: 2023-02-03 16:51 With quotas or a user home directory in a separate filesystem.
Thanks! The quotas from this article?
https://en.wikipedia.org/wiki/Disk_quota

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Limit disk space available to a user

#4 Post by p.H »

Yes.

Post Reply