LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-13-2008, 12:02 PM   #1
gustavolinux
Member
 
Registered: Aug 2008
Posts: 36

Rep: Reputation: 15
ajuda: Limitar tamanho de diretório sem uso de quotas


Pessoal, gostaria que alguém me desse uma luz, por favor, para resolver o seguinte problema: preciso de uma forma de limitar o tamanho de um diretório, mas sem utilizar cotas de grupos e usuário... será que existe uma forma eficaz e prática?

Por exemplo, quero impedir que o diretório X fique com mais de 100MiB, independente de quem tem acesso a ele...

Será que em último caso seria possível criar um usuário somente para controlar o tamanho da pasta X? Será que colocando esse usuário como owner da pasta, e liberando todas as permissőes de escrita, quando alguém escrevesse na pasta consumiria a cota desse usuário e assim seria possível impor um limite máximo para uma pasta em particular?


obrigado desde já
 
Old 08-13-2008, 12:36 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,465

Rep: Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117Reputation: 6117
Quote:
Originally Posted by gustavolinux View Post
Pessoal, gostaria que alguém me desse uma luz, por favor, para resolver o seguinte problema: preciso de uma forma de limitar o tamanho de um diretório, mas sem utilizar cotas de grupos e usuário... será que existe uma forma eficaz e prática?

Por exemplo, quero impedir que o diretório X fique com mais de 100MiB, independente de quem tem acesso a ele...

Será que em último caso seria possível criar um usuário somente para controlar o tamanho da pasta X? Será que colocando esse usuário como owner da pasta, e liberando todas as permissőes de escrita, quando alguém escrevesse na pasta consumiria a cota desse usuário e assim seria possível impor um limite máximo para uma pasta em particular?


obrigado desde já
Please repost in English.
 
Old 08-13-2008, 12:53 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
According to Google translate, it goes something like this:
Quote:
aid: Limit size of directory without use of quotas
Folks, that someone like me that a light, please, to solve the following problem: need a way to limit the size of a directory, but without using quotas of user groups and ... is there an effective and practical?

For example, I want to prevent the directory X is over 100MiB, regardless of who has access to it ...

Does a last resort would be possible to create a user only to control the size of your X? Does putting the user as owner of the folder, and releasing all the rights of writing, when someone write in the folder consume the quota this user and thus could impose a ceiling for a folder in particular?
It's a lousy translation, but it looks as though gustavolinux would like to use quotas.
 
Old 08-13-2008, 01:03 PM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
You could mount the directory on a partition that is only 100MB in size.
 
Old 08-13-2008, 02:16 PM   #5
gustavolinux
Member
 
Registered: Aug 2008
Posts: 36

Original Poster
Rep: Reputation: 15
help: to limit a folder`s size without using quotas

Friends, could anybody there give me a light, please, to solve the following problem: I need a way to limit the size of a folder, but without using group or user quotas... is there a good solution?

For example, I want to avoid that folder X grows up more than 100MiB, no matters who writes to the folder...

If there is no such way, maybe do you think that it is possible to create a new user account just to control the size of the folder X? I mean to put this new user as the owner of the folder X and allow any access to the folder... Do you think that, if someone writes to the folder, the quota of the new user would be consumed and reach an unbreakable limit?

thanks in advance
 
Old 08-13-2008, 02:20 PM   #6
gustavolinux
Member
 
Registered: Aug 2008
Posts: 36

Original Poster
Rep: Reputation: 15
ideas?

folks, ahead I tried to write in english... sorry, sometimes I get a little confused about what forum uses what language...

the idea of the partition is ok, but a little hard to change right... resizing a partition takes time, right?

is there a better solution with UID or GID?

thanks for the attention
 
Old 08-14-2008, 09:10 AM   #7
gustavolinux
Member
 
Registered: Aug 2008
Posts: 36

Original Poster
Rep: Reputation: 15
controlling the folder's disk quota with setgid

Folks, I need to limit the size of a folder shared in the network, no matters who have access and write to it... in other words, think about a folder that every user have to

access and possibly write, but the size of this folder has to be under a size limit...

In my concern, there is no configuration mecanism especially made to this task, right? I think that the proper feature should come from the filesystem...

But, anyway, I thought about a solution using group quotas. I guess that when you enable the folder's setgid bit, everything that is copied to that folder becames owned by the folder's group owner. If I create a group of users, let's say named "Control", and put every network user in this group (but as a secondary group - "Control" won't be the main group of no user), do you think that the "Control"s group disk quota (properly configured) will limit the size of the folder (without limiting no user's quota)...

Is there a chance that this idea work? Is there a better choice?

Thanxs in advance....
 
Old 08-19-2008, 10:23 AM   #8
gustavolinux
Member
 
Registered: Aug 2008
Posts: 36

Original Poster
Rep: Reputation: 15
solved

just to give a feedback: a loop device was a really good idea... to every folder that I want to limit its size I create an image of a file system with the right size... []'s
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
session_mm_apache0.sem in / -- Is this a problem? Slacktastic Linux - Server 1 12-13-2006 01:17 PM
sem has incomplete type error in building the filesystem image sudhirvemana Linux - Newbie 1 11-25-2004 01:45 PM
sem has incomplete type error in building the filesystem image sudhirvemana Linux - Software 0 11-25-2004 03:17 AM
Cypress Sem. PS2/USB Mouse not working properly ElvenAssassin Linux - Hardware 1 04-25-2004 04:36 PM
apache logs getting mm.11613.sem.1029180882 ForumKid Linux - General 2 09-06-2002 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration