From: Albert Schlef Date: 2010-02-12T21:04:20+09:00 Subject: Re: how to set permission '777' to dir? Pat Kiatchaipipat wrote: > hello, I've some question when I want to create new folder with > permission '777'. > > I use following code > > [code] > FileUtils.mkdir 'tmp', :mode => 0777 > [/code] > > and the result is in the picture. it show me '775' what's wrong with > this code? That's because, on POSIX systems, the permissions of a new file/directory are set to what you asked for (0777 in your case) minus something called umask. Google for "umask" to learn about it. If you really want 0777, do File.chmod() (or FileUtils.chmod()) after creating the file. -- Posted via http://www.ruby-forum.com/.