Files
mars-dosutils/test/quota
2026-06-12 10:21:20 +02:00
..
2026-06-12 10:21:20 +02:00
2026-06-12 10:21:20 +02:00
2026-06-12 10:21:20 +02:00

DOS quota write-deny smoke

This test proves the last step of NetWare-style quota enforcement with DOS board tools: Linux/NCPFS sets the user quota, then a real DOS client logs in as NOPASSUSER and attempts the file writes.

It is intentionally split because the authoritative quota setup remains on the Linux/MARS-NWE side:

  1. In DOS, login as SUPERVISOR on the target volume and run:

    F:
    DQTSTA PREP
    

    This creates F:\DQTTEST\NCPQFILL, grants NOPASSUSER write/create rights, and creates F:\DQTCMP for logs.

  2. On Linux, set the user quota for NOPASSUSER to 12 4K blocks on the same volume. With the mars-nwe ncpfs helper this is typically:

    ./nwfs_ncpfs_userquota -S MARS -U SUPERVISOR -P 'password' \
      --volume QUOTA --object NOPASSUSER --type 1 --limit-4k 12
    

    For SYS/NWQUOTA metadata-backend testing, use --volume SYS instead.

  3. In DOS, login as NOPASSUSER and run:

    F:\DQTC.BAT
    

    DQTC writes Q00001.BIN through Q00012.BIN as 4K files, then expects QFAIL.BIN to be denied.

  4. In DOS, login as SUPERVISOR and run:

    F:\DQTSTA PART2
    F:\DQTZIP
    

Expected result:

PASS: DOS quota deny observed.

The test does not set quotas itself. That keeps the authority split explicit: Linuxquota volumes are configured/enforced by the Linux backend, while NWQUOTA metadata volumes use the MARS-NWE metadata backend. The DOS part proves the client-visible write behavior.