[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to set only delete permision in a directory and theirs subdirectories.



On Thu, Jan 07, 2010 at 02:29:25AM +0100, Marc Aymerich wrote:
> Hi all!
> 
> I can't use kernel quota module and I would like implement a substitute
> for it. My idea is run a 'du' every night that it counts the amount of disk
> space that every user has in his own home. The matter is, how can I prevent
> users from using more disk space than the allowed by their quota?.
> 
> In the first place I thought of remounting their home with 'ro' option, but
> that isn't a good idea because the user wouldn't able to clean his home
> directory in order to recover write permission. Then, my question is:
> 
> There are any mechanism that I can use for forbid writes but allow deletes?
> Maybe with ACLs? Maybe with /etc/security/limits.conf? I don't know :(

use LVM and maker LV equal to the max size allocated to the user, then
mount the partition on their home directory. 

you then have to make sure they don't leave files in other places like
/tmp or /var/tmp ...


> 
> Thanks for thinking about it!!
> Marc
> 
> PD: If you can't resist the temptation of asking why I can't use quota
> module. The answer is because the home partition is mounted from a iSCSI
> device inside a openVz container. And the quota support for this scenario
> isn't implemented yet :(.

-- 
"You know, one of the hardest parts of my job is to connect Iraq to the war on terror."

	- George W. Bush
09/06/2006
Washington, DC
in an interview on CBS News

Attachment: signature.asc
Description: Digital signature


Reply to: