over quota .htpasswd problem

Discussion in 'General' started by hairydog2, Jul 24, 2008.

  1. hairydog2

    hairydog2 New Member

    I tried to add a new user to an access-restricted directory today.

    I hadn't noticed that this account had gone over quota.

    Adding the user failed with an error message that didn't explain what the problem was, but that's not a big deal.

    What was more of a problem was that it replaced the .htpasswd file with one of 0 bytes, immediately locking all the current users out.

    It would be good to have some checking built in to stop this happening!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thanks for reporting this. I added it to the bugtracker.
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Where exactly did you have this problem? Under Web-FTP, when you try to password-protect a directory?

    I've just tried that and couldn't reproduce it.
     
  4. hairydog2

    hairydog2 New Member

    Yes, that was what I did.

    However, there seem to be other quota problems. I'd really like to rebuild the quota files, but I'm not sure how to do it.

    quotaoff -av
    quotacheck -augvm
    quotaon -a

    don't sort it out for me. I get this:

    # quotaon -a
    quotaon: using //quota.group on /dev/md/0 [/]: No such process
    quotaon: Quota format not supported in kernel.
    quotaon: using //quota.user on /dev/md/0 [/]: No such process
    quotaon: Quota format not supported in kernel.


    Any ideas?
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Are the quota modules loaded? Please try
    Code:
    modprobe quota_v1
    modprobe quota_v2
     
  6. hairydog2

    hairydog2 New Member

    Seems not:

    FATAL: Could not load /lib/modules/2.6.26-bytemark-x86/modules.dep: No such file or directory

    So what should I do to fix it?
     
    Last edited: Sep 22, 2008
  7. falko

    falko Super Moderator ISPConfig Developer

    What are the outputs of
    Code:
    ls -la /lib/modules/2.6.26-bytemark-x86/
    and
    Code:
    uname -a
    ?
     
  8. hairydog2

    hairydog2 New Member

    # ls -la /lib/modules/2.6.26-bytemark-x86/
    ls: /lib/modules/2.6.26-bytemark-x86/: No such file or directory

    # uname -a
    Linux hosting.hairydog.co.uk 2.6.26-bytemark-x86 #1 SMP Thu Jul 24 19:28:31 BST 2008 i686 GNU/Linux

    so I tried:

    # ls -la /lib/modules/
    total 28
    drwxr-xr-x 7 root root 4096 Aug 13 01:59 .
    drwxr-xr-x 13 root root 4096 Aug 1 01:13 ..
    drwxr-xr-x 3 root root 4096 Sep 9 2006 2.6.16-1-k7
    drwxr-xr-x 3 root root 4096 Feb 4 2008 2.6.18-5-686
    drwxr-xr-x 3 root root 4096 Feb 4 2008 2.6.18-5-686-bigmem
    drwxr-xr-x 3 root root 4096 Sep 7 21:44 2.6.18-6-686-bigmem
    drwxr-xr-x 3 root root 4096 Aug 13 01:59 2.6.24


    then

    /lib/modules/2.6.24# ls -la
    total 1612
    drwxr-xr-x 3 root root 4096 Aug 13 01:59 .
    drwxr-xr-x 7 root root 4096 Aug 13 01:59 ..
    drwxr-xr-x 9 root root 4096 Aug 13 01:59 kernel
    -rw-r--r-- 1 root root 359744 Aug 13 01:59 modules.alias
    -rw-r--r-- 1 root root 69 Aug 13 01:59 modules.ccwmap
    -rw-r--r-- 1 root root 332208 Aug 13 01:59 modules.dep
    -rw-r--r-- 1 root root 147 Aug 13 01:59 modules.ieee1394map
    -rw-r--r-- 1 root root 451 Aug 13 01:59 modules.inputmap
    -rw-r--r-- 1 root root 22301 Aug 13 01:59 modules.isapnpmap
    -rw-r--r-- 1 root root 74 Aug 13 01:59 modules.ofmap
    -rw-r--r-- 1 root root 271552 Aug 13 01:59 modules.pcimap
    -rw-r--r-- 1 root root 1387 Aug 13 01:59 modules.seriomap
    -rw-r--r-- 1 root root 156430 Aug 13 01:59 modules.symbols
    -rw-r--r-- 1 root root 438571 Aug 13 01:59 modules.usbmap

    but it isn't looking there anyway!
     
    Last edited: Sep 23, 2008
  9. falko

    falko Super Moderator ISPConfig Developer

    You're running a kernel that doesn't exist on your file system... :confused:

    What's in /boot/grub/menu.lst?
     
  10. hairydog2

    hairydog2 New Member

    I can guess how it came to be like this. The whole thing was migrated to more powerful hardware a month or so ago, and the people we lease the hardware from had to fiddle about with different kernels to get it to boot. Maybe they left things in a strange state, or a directory was wrongly named?

    Anyway, the answer to your question is:

    default 0
    timeout 10
    serial --speed=115200
    terminal --timeout=10 serial console

    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.

    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    #
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    default 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 5

    # Pretty colours
    color cyan/blue white/blue

    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$jhhU0/$aW78kHe3t3tt3eV3P2b2znUoe/
    # password topsecret

    #
    # examples
    #
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    #
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    #

    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below

    ## DO NOT UNCOMMENT THEM, Just edit them to your needs

    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=/dev/md0 ro console=tty0 console=ttyS0,115200

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,0)

    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true

    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false

    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=

    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false

    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=

    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0

    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(single-user) single
    # altoptions=(recovery mode) single

    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all

    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true

    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false

    ## ## End Default Options ##

    title Debian GNU/Linux, kernel 2.6.26-bytemark-x86
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.26-bytemark-x86 root=/dev/md0 ro console=tty0 console=ttyS0,115200
    savedefault

    title Debian GNU/Linux, kernel 2.6.26-bytemark-x86 (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.26-bytemark-x86 root=/dev/md0 ro console=tty0 console=ttyS0,115200 single
    savedefault

    title Debian GNU/Linux, kernel 2.6.26-rc6-bytemark-x86
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.26-rc6-bytemark-x86 root=/dev/md0 ro console=tty0 console=ttyS0,115200
    savedefault

    title Debian GNU/Linux, kernel 2.6.26-rc6-bytemark-x86 (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.26-rc6-bytemark-x86 root=/dev/md0 ro console=tty0 console=ttyS0,115200 single
    savedefault

    title Debian GNU/Linux, kernel 2.6.24
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.24 root=/dev/md0 ro console=tty0 console=ttyS0,115200
    initrd /boot/initrd.img-2.6.24
    savedefault

    title Debian GNU/Linux, kernel 2.6.24 (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.24 root=/dev/md0 ro console=tty0 console=ttyS0,115200 single
    initrd /boot/initrd.img-2.6.24
    savedefault

    title Debian GNU/Linux, kernel 2.6.18-6-686-bigmem
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-6-686-bigmem root=/dev/md0 ro console=tty0 console=ttyS0,115200
    initrd /boot/initrd.img-2.6.18-6-686-bigmem
    savedefault

    title Debian GNU/Linux, kernel 2.6.18-6-686-bigmem (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-6-686-bigmem root=/dev/md0 ro console=tty0 console=ttyS0,115200 single
    initrd /boot/initrd.img-2.6.18-6-686-bigmem
    savedefault

    title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-5-686-bigmem root=/dev/md0 ro console=tty0 console=ttyS0,115200
    initrd /boot/initrd.img-2.6.18-5-686-bigmem
    savedefault

    title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-5-686-bigmem root=/dev/md0 ro console=tty0 console=ttyS0,115200 single
    initrd /boot/initrd.img-2.6.18-5-686-bigmem
    savedefault

    title Debian GNU/Linux, kernel 2.6.18-5-686
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-5-686 root=/dev/md0 ro console=tty0 console=ttyS0,115200
    initrd /boot/initrd.img-2.6.18-5-686
    savedefault

    title Debian GNU/Linux, kernel 2.6.18-5-686 (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.18-5-686 root=/dev/md0 ro console=tty0 console=ttyS0,115200 single
    initrd /boot/initrd.img-2.6.18-5-686
    savedefault

    title Debian GNU/Linux, kernel 2.6.16-1-k7
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.16-1-k7 root=/dev/md0 ro console=tty0 console=ttyS0,115200
    initrd /boot/initrd.img-2.6.16-1-k7
    savedefault

    title Debian GNU/Linux, kernel 2.6.16-1-k7 (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.16-1-k7 root=/dev/md0 ro console=tty0 console=ttyS0,115200 single
    initrd /boot/initrd.img-2.6.16-1-k7
    savedefault

    ### END DEBIAN AUTOMAGIC KERNELS LIST
     
  11. falko

    falko Super Moderator ISPConfig Developer

    Ok, can you back up the current menu.lst and then run
    Code:
    update-grub
    ?
    What does menu.lst look like then?
     
  12. hairydog2

    hairydog2 New Member

    I've now switched to the next release of the kernel and there is a matching directory. But it didn't fix the problem!

    So then I deleted the quota files and rebuilt them. That seems to have sorted the problem out. Looks as if the quota file format changed without doing a conversion.
     

Share This Page