Implementing quotas on Solaris 8

Posted on 2006-04-04
Last Modified: 2013-12-21
Is there any way I can implement a quota on a subdirectory on a file system. currently i need to implement a file system on a partition/subdirectory. I cannot implement it on the global partition as it will apply to the whole filesytem onthat partition. Just want to know if I could mount this subdirectory to some othe rpartiton and implement the quota on that mount.

Question by:wfaleiro
    LVL 3

    Accepted Solution

    Quotas are inherently a property of the mount of a physical filesystem, and can not be applied to virtual, network, or other types of mounts. You can enable quotas on the whole filesystem and then just specify limits for the user(s) or group(s) that will be writing to the directory that you wish to limit.

    If you are simply trying to limit the behavior of applications that may be writing to a specific directory, create a group for this purpose and set quota limits for it. Then set the group owner of the directory to the limited group and turn on the set-gid permission bit on the directory (with a command such as "chmod g+s <path>"). This sets the directory in BSD-style group propagation mode so that all files and subdirectories created will have the group of their parent, and thus subject to your quota, regardless of the uid or gid of the running application that created the file.

    This method is sufficient to limit well-behaved applications that simply create or write to files in the limited directories. If you are trying to limit applications or users that may attempt to subvert the quota system by changing the group ownership of files or directories, then you will also need to guarantee that any applications run with only the gid of the limited group, and no additional groups, thus preventing them from changing group owners of files or directories to anything else. This still will not prevent them from writing to exisiting files with other group owners without limit; the only way to prevent that is to be sure such files are never writable to them in the filesystem.
    LVL 7

    Expert Comment

    No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
    I will leave the following recommendation for this question in the Cleanup topic area:

    Accept: TimEliseo

    Any objections should be posted here in the next 4 days. After that time, the question will be closed.

    EE Cleanup Volunteer

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now