From: ted cooper Date: 2011-04-30T03:37:13+09:00 Subject: [ruby-core:35953] [Ruby 1.9 - Feature #2190]FileUtils::chmod - allow symbolic mode Issue #2190 has been updated by ted cooper. +1 we have a million `chmod ...` expressions lurking because of this omission. please accept this into trunk! ---------------------------------------- Feature #2190: FileUtils::chmod - allow symbolic mode http://redmine.ruby-lang.org/issues/2190 Author: Suraj Kurapati Status: Open Priority: Normal Assignee: Category: lib Target version: 1.9.x Hello, I request that FileUtils::chmod() and FileUtils::chmod_R() accept symbolic modes, which are strings like "u+x,g-w,o=" (see "symbolic mode" in `man chmod` for details), in addition to the numeric modes they currently accept. If my request is fulfilled, the following would be equivalent: FileUtils::chmod(0712, "file.txt") FileUtils::chmod("u=rwx,g=x,o=w", "file.txt") In addition, symbolic modes would allow delta/patch changes: FileUtils::chmod("g+w", "file.txt") This is not so easy with numeric modes, because you must first read the current mode, apply your delta/patch mode using a bitwise OR operation, and finally apply the new numeric mode using FileUtils::chmod(). Thanks for your consideration. -- http://redmine.ruby-lang.org