|
"umask" will only change the filemode new files are being created with. I don't think there is a way without copying/modifying the file in Ygors way.
The alternative to copying would be to effectively become the user who owns the file, at least for the moment needed to change the filemode. This is what i had in mind when i suggested sudo. You could also use more extravagant (and surely far less reliable and less desirable) ways to achieve the same goal like suid-ed copies of shell executables and the like. I don't think these are of more than theoretical value.
I hope this helps.
bakunin
|