You want to return the string found from each of the functions, instead of writing it to a file. Then, if conditions are met, write them all to the file. So readfiles() would be similar to the following using your existing structure.
def readfiles(filename):
filelist = open(filename)
write_owner = ""
write_name = ""
for line in filelist:
files = line[:-1]
print files
owner = add_ownerid(filename)
if len(owner): ## owner was found in the line
write_owner = owner
name = add_ownername(files)
if len(name):
write_name = name
user = add_userid(files)
## assumes that user id is the cut off point
if len(user) and len(write_owner):
write_data(write_owner, write_name, user)
write_owner = ""
write_name = ""