chmod 754 to every file,but how to change the attribute of the file according to file type??