It's not safe_mode you have to worry about so much as it is permissions. Most hosts execute PHP scripts using the credentials of the server daemon (e.g. username 'www'). If this user doesn't have permission to modify the file permissions of a user's files, then you won't be able to use chmod() in any PHP scripts.
Basically, check the return status of [man]chmod/man; if it's FALSE, display an error message telling the user what each file should be CHMOD'ed to.