From: Motohiro KOSAKI Date: 2011-05-03T20:35:36+09:00 Subject: [ruby-core:35980] [Ruby 1.9 - Feature #2190] FileUtils::chmod - allow symbolic mode Issue #2190 has been updated by Motohiro KOSAKI. I slightly change the testcase at r31415. because FreeBSD don't change sticky bit. Thx. ---------------------------------------- Feature #2190: FileUtils::chmod - allow symbolic mode http://redmine.ruby-lang.org/issues/2190 Author: Suraj Kurapati Status: Closed Priority: Normal Assignee: Motohiro KOSAKI Category: lib Target version: 1.9.x =begin 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. =end -- http://redmine.ruby-lang.org