cybersecurity · intermediate · ~15 min · safe pentest lab

World-writable file?

Flag world-writable permissions in an audit.

Challenge

Implement int audit_world_writable(int mode) returning 1 if the other-write bit (octal 0002) is set, else 0.

Starter code

int audit_world_writable(int mode) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.