changing file mode to 777