Change mode and use system command to check : chmod « File Directory « Ruby






Change mode and use system command to check



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

 








Related examples in the same category

1.Masks for chmod
2.Changing File Modes and Owner
3.Change file mode to 0644
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