Changing File Modes and Owner : chmod « File Directory « Ruby
- Ruby
- File Directory
- chmod
Changing File Modes and Owner
To change the mode (permissions or access list) of a file, use the chmod method with a mask
file = File.new( "books.txt", "w" )
file.chmod( 0755 )
Related examples in the same category