in reply to can't get chmod to work

I'm sure tachyon's diagnosis is correct. There are two ways to do what you want.

  1. Write a small standalone script to just do the chmod and return status ( 0 = success), make it suid, and call via perl system.
  2. On Apache, arrange for your original cgi script to run suEXEC.

I prefer the latter, but opinions differ on that. suEXEC demands a sound perl program. Taint mode helps with that.

After Compline,
Zaxo