Dithiocarbamate (DTC)-anchored monolayers and polymers were investigated as positive resists for UV photolithography on planar and roughened Au surfaces. DTCs were formed in situ by the condensation of CS2 with monovalent or polyvalent amines such as linear polyethyleneimine (PEI) under mildly basic aqueous conditions, just prior to surface passivation. The robust adsorption of the polyvalent PEI–DTC to Au surfaces supported high levels of resistance to photoablation, providing opportunities to generate thin films with gradient functionality. Treatment of photopatterned substrates with alkanethiols produced binary coatings, enabling a direct visual comparison of DTC- and thiol-passivated surfaces against chemically induced corrosion using confocal microscopy.