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/.