Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Linux Help: Restricting User Space

  • 25-02-2006 10:50am
    #1
    Closed Accounts Posts: 6,151 ✭✭✭


    Ok, i've searched google to no avail for help on this, so i'd really appreciate if anyone can help me here.

    Basically what I want to do is impose a limit on the maximum size of a /home/user_name folder, so as not to allow specific users waste too much hard disc space.

    Thanks in advance
    Sean


Comments

  • Registered Users, Registered Users 2 Posts: 1,193 ✭✭✭liamo


    Ok, i've searched google to no avail for help on this, so i'd really appreciate if anyone can help me here.

    Basically what I want to do is impose a limit on the maximum size of a /home/user_name folder, so as not to allow specific users waste too much hard disc space.

    Thanks in advance
    Sean
    What you're looking for is Disk Quotas. You can set a quota for a user or a group. However, it applies to a filesystem not to a directory. If /home is a separate filesystem, setting Disk Quotas on a per user basis will do the job for you.

    Regards,

    Liam


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    the /home directory is not a seperate file system, so i don't think that would work


  • Registered Users, Registered Users 2 Posts: 1,193 ✭✭✭liamo


    the /home directory is not a seperate file system, so i don't think that would work
    It may well still be a viable solution depending on where your users are creating files. If they're only writing to their home folder then Disk Quotas on the filesystem that hosts the home folder would do the job nicely. If however, there are shared folders that users can write to then it get a little more complicated. Even still, introducing quotas might fit be of some help. You'd have to make your own call on that decision.

    I don't think you're going to find a way to apply quotas on a per-folder basis but you could instead set up a cron job to run at night to check the amount of space being consumed by the directories in the /home and to report if any of them exceed a specified limit.

    Regards,

    Liam


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    i suppose that is the best solution then, as users are only writing to their home folders as that is the only folder they have access to over the network
    thanks for your help


  • Registered Users, Registered Users 2 Posts: 16,288 ✭✭✭✭ntlbell


    you could do it on a per directory basis, be very ugly tho i'd say

    something like this

    enable quota's on the file system hosting /home

    Create a quota group for each user you'd have to this for every single user.

    create directorys and make the quata group unique to that directory, set the directory setgid then all data in that folder will belong to the quota group and be subject to that quota.

    uglllly as sin...

    I've never done this so good luck!

    It might be handier to back up home create a seperate filesystem and mount /home on it.




  • Advertisement
  • Closed Accounts Posts: 210 ✭✭deimos


    Hmmm, personally (to be a prick:D ) I would write a shell script that would get the size of the users dir (du), send them a mail saying them have 24 hours to bring it down to such a size, and if 24 hours later it is not that size use find to find the last bunch of files created/modified and delete them until it's down to size....

    Now, you're happy, and they are pissed of to no end.


Advertisement