Forum OpenACS Q&A: Unable to extend index error on Oracle (and fix)

We resolved this problem on Heidelberg's .LRN server where it came up on file upload; duplicating information here so that it's searchable. This is essentially on Oracle issue, not OpenACS, but presumably other people will run into it as well:
ora8.c:3962:ora_tcl_command: error in `OCIStmtExecute ()': ORA-01654:
    unable to extend index PRODUCT.ACS_PERMISSIONS_PK by 4 in tablespace
    PRODUCT ORA-06512: at "PRODUCT.ACS_PERMISSION", line 10 ORA-06512: at
    line 4 SQL: declare begin acs_permission.grant_permission( object_id
    => :object_id, grantee_id => :party_id, privilege => :privilege );
    end;

We dug around searching for something to have extended its max size, and finally identified the following datafile, belonging to the PRODUCT tablespace:

    SVRMGR> select * from dba_data_files where tablespace_name =
    'PRODUCT';
    FILE_NAME FILE_ID TABLESPACE_NAME BYTES \
    BLOCKS STATUS RELATIVE_F AUT MAXBYTES MAXBLOCKS INCREMENT_ USER_BYTES
    USER_BLOCK

    /ora8/m02/oradata/ora8/product01.dbf 11 PRODUCT 6291456\
    00 76800 AVAILABLE 11 YES 629145600 76800 1280 629080064 76792
    1 row selected.

Notice how the current 76792 blocks are very close to the max 76800 blocks (given that it extends with 1280 blocks at a time). The fix is to add a new file. Depending on how many big files you'll be adding, you may want to adjust the size and autoextend, the details of which are out of the scope of this post.

  SVRMGR> alter tablespace product add datafile
    '/ora8/m02/oradata/ora8/product02.dbf' size 50m autoextend on next 5m;
    Statement processed.