Re: Limit folder (with subfolders) capacity



freduchi@xxxxxxxxx wrote:
Hi, I need sugestions.
I need to implement the next and I don´t know how to do it:

I am developing a website in which users are signed up and share
information(Messages, Photos...).

When a user is signed up, his data is stored in a database and he is
asigned with a folder.

What I need, is to limit the folder capacity of each user to a given
size(5 mb for example).

For now all users would have the same capacity.And that would be
enough for now.

I Can´t limit this by code, because I am using third party software,
in some services, and I cannot control It.

I have read about something disk quotas.I am not
familiar to this.Would it be useful for my needs?.

If not, Which is the best way to achieve this?.

The ideal for me would be to be able to limit the capacity of a given
folder(included subfolders) to a size, so when I create the folder in
my code, I would also limit its size to the desired capacity.

Note: I am using php5 and my hosting uses linux.

Thanks.
Sincerely - SPEASEMAR - Spain
www.speasemar.com



Disk quotas are a function of the operating system, not PHP. They will do what you want, but how to set them is OS dependent (and you may not be able to do it in your code due to OS or hosting company restrictions).

What I do is when they go to the upload page, I check how much space they have left in the directory, then set that as the maximum they can upload.

Of course this won't work if they use ftp or similar, but it works fine for uploading via html pages.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: Publishing all pages in Publisher 2003
    ... for some reason the bottom navbar that Publisher produces with its ... folder entirely, because some of your images are indeed on the server: ... upload all the files. ... Then either log on to your host control panel and use the file manager ...
    (microsoft.public.publisher.webdesign)
  • Re: Website only views in IE
    ... index.htm file and your index_files folder, direct those files to a folder ... Publisher wizard built navbars rendering in IE8, ... fool proof rule for this but it seems that the fancier the border, ... Be sure to compress your images before you upload again. ...
    (microsoft.public.publisher.webdesign)
  • Re: Problem loading Pub 2003 website
    ... Be sure to upload the index_files folder ... pictures still won't load, although one of the before pictures on the ... Be sure to overwrite or manually delete the old Publisher .htm files ...
    (microsoft.public.publisher.webdesign)
  • Re: Problem loading Pub 2003 website
    ... Be sure to upload the index_files folder ... pictures still won't load, although one of the before pictures on the ... Be sure to overwrite or manually delete the old Publisher .htm files ...
    (microsoft.public.publisher.webdesign)
  • Re: Publishing all pages in Publisher 2003
    ... upload all the files. ... When you insert large image files into your Publisher doc, ... graphics and upload the new index.htm file and the new index_files folder. ... Then either log on to your host control panel and use the file manager to ...
    (microsoft.public.publisher.webdesign)

Loading