I always thought, if the setuid bit was set (it is, as you can see), the program should run with the owner’s (here: root) privileges and hence should not require further authentication.
Am I getting this wrong or is this a particularity of Ubuntu or Debian based distributions? Any enlightening comment would be appreciated.
PS: I’m not looking for a solution to the file copy issue. I know many ways to achieve this, but I’d simply like to understand why this particular attempt to solve it, fails.
Starting with the sentence " Linux ignores the setuidÂą bit on all interpreted executables (i.e. executables starting with a #! line)."
For me its TLDR; but seems totally relevant
Also, nice to know, that according to the article, Perl scripts are exempt from the rule, due to the fact that the Perl compiler “performs the necessary checks and reinvokes the interpreter on the desired scripts with the desired privileges”.