Implementing quotas on Solaris 8

Hi,
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.

Thanks,
--Walter
LVL 1
wfaleiroAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimEliseoCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
XoFCommented:
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.

-XoF-
EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.