[clue-tech] Filesystem quotas circumvented

Angelo Bertolli angelo at freeshell.org
Tue Jan 18 15:38:49 MST 2005


Greg Knaddison wrote:

>On Tue, 18 Jan 2005 15:16:03 -0500, Angelo Bertolli
>  
>
>>So today I tried to do this (as user angelo):
>>
>>cd /
>>sudo ls -lhRt > ~/lsr
>>
>>    
>>
>
>What happens if you remove the sudo?
>
>Basically I think that the sudo is over-riding your quota (just a
>guess).  If you are using sudo to get around permissions errors, why
>not do something else that will produce great volumes, like
>
>  
>
Apparently, it does have something to do with root

[angelo at web1 angelo]$ yes > ~/tmp
ide0(3,2): warning, user block quota exceeded.
ide0(3,2): write failed, user block limit reached.
yes: standard output: Disk quota exceeded

[angelo at web1 angelo]$ sudo yes > ~/tmp
[angelo at web1 angelo]$
[angelo at web1 angelo]$ quota
Disk quotas for user angelo (uid 635):
     Filesystem  blocks   quota   limit   grace   files   quota   
limit   grace
      /dev/hda2  161476* 100000  150000             353   10000   15000

However, the file created is owned by angelo

I thought sudo should only apply to the command in question, for example:

[angelo at web1 angelo]$ yes > /root/tmp
bash: /root/tmp: Permission denied
[angelo at web1 angelo]$ sudo yes > /root/tmp
bash: /root/tmp: Permission denied

Does anyone know the finer details on why this is the case?

Angelo




More information about the clue-tech mailing list