#1
  1. No Profile Picture
    mvlaran
    Guest
    Devshed Newbie (0 - 499 posts)
    My network allows each user to access his/her own home directory in the server, and I limit the disk usage with the Linux Disk Quota System... but the Windows 9x and NT does not recognize the quota format and tells the client that he/she have xxx bytes free where this is the total free, not his/her quota usage... and I can access the user quota usage by repquota -u <user> command....

    What I want to know is if is possible to read the user quota and display it in a dynamic web page compiled with php3, so my users can any time refresh and view his / her disk usage and so on....

    any information is valid ! I would thank you... and apologize for my english...

    thanks again

    ------------------
    See ya,

    Marcus Laranjeira
    São Paulo - SP - Brazil

    Linux User #101315
  2. #2
  3. No Profile Picture
    moderator
    Guest
    Devshed Newbie (0 - 499 posts)
    I haven't tried this, but it sounds like you should be able to make it work somehow.

    Check out the PHP docs on system():

    www.devshed.com/Server_Side/PHP/Manual/manfiles/function.system.html

    Good luck.
  4. #3
  5. No Profile Picture
    mvlaran
    Guest
    Devshed Newbie (0 - 499 posts)
    I was thinking of using system or exec function, but either system or exec returns no data and the system logs register
    this message : "/home/quota.user: Permission denied"... so, I still can't access quota information because I am not the super user... none php3 use super user to access the system.... What else I could try !?


    ------------------
    See ya,

    Marcus Laranjeira
    São Paulo - SP - Brazil

    Linux User #101315
  6. #4
  7. No Profile Picture
    Gizmo
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,
    What about this:
    - write little shell-script which calls repquota and pipes output into textfile;
    - place script into crontab; dependent on usage-level of system - call it every half hour or more often;
    - write PHP-Script that read textfile.

    Not the best solution, not in-time values, and you should add some locking-mechanism due to file access; but I think, it'll do the job

    If you have further questions - send me an email.

    Ciao,
    Alexander.
  8. #5
  9. No Profile Picture
    Pointman
    Guest
    Devshed Newbie (0 - 499 posts)
    Might try using a setuid wrapper? I have never tried it via PHP, but I use them all the time to post new page text via email...

IMN logo majestic logo threadwatch logo seochat tools logo