To change the mode (permissions or access list) of a file, use the chmod method with a maskfile = File.new( "books.txt", "w" )file.chmod( 0755 )