Change file mode to 0644 : chmod « File Directory « Ruby






Change file mode to 0644


file = File.new( "books.txt", "w" ).chmod( 0644 )
system "ls -l books.txt"
File.delete( "books.txt" )

 








Related examples in the same category

1.Masks for chmod
2.Changing File Modes and Owner
3.Change mode and use system command to check
4.Changing the Permissions on a File
5.Take away the world's read access.
6.Give everyone access to everything
7.Take away the world's write and execute access