I ran into a rather complicated problem with Ruby and File.chmod (the same problem exists with FileUtils.chmod.
Here is what I am doing for a test case:
File.chmod(1777, "testfile")
But as soon as I did this, I get this as a set of permissions:
--wxrwS--t
This problem only exists when using * nix 4 bit permission sets. I googled it, but got nothing of value. When permission set 0777 is installed, it assigns correctly, but something greater than 0 for the first digit will spoil the permissions pretty badly.
Does anyone have any clues?
I know that I can make a system call to do what I want, but I'm sure it is something simple that I am missing.
source share