From: Brian Candler Date: 2010-02-15T18:31:34+09:00 Subject: Re: how to set permission '777' to dir? Try running this script: begin Dir.mkdir("footst") puts File.stat("footst").mode.to_s(8) File.chmod(0777, "footst") puts File.stat("footst").mode.to_s(8) ensure Dir.rmdir("footst") end For me (under Linux) it shows: 40755 40777 Does it not for you? The alternative solution (which is probably not threadsafe) is to modify umask, like this: begin old_umask = File.umask File.umask 0 Dir.mkdir("footst") puts File.stat("footst").mode.to_s(8) Dir.rmdir("footst") ensure File.umask old_umask end -- Posted via http://www.ruby-forum.com/.