title: Linux program privilege: How to change a program to be executable by all users?
body: <p>I wrote a python program that needs to call aircrack program to some tasks, but I run into trouble with the privilege. Initially the aircrack program is called in command line, it requires "sudo" at the beginning. After that I checked the location of the executable and found that it locates under <code>/usr/sbin/</code>. Right now my program is driven by apache and the default user is www-data. If I execute the program with user www-data without "sudo", it won't give any result. </p>
  
  <p>I googled a little bit on this problem, and found that we can change the owner of aircrack program by executing <code>sudo chmod 4755 /usr/sbin/airodump-ng</code>. I tried it and the privilege is changed from <code>-rwxr-xr-x</code> to <code>-rwsr-xr-x</code>. I executed the command once again without "sudo" but it doesn't make any difference.</p>
  
  <p>My questions is that: how can I change the privilege of a program so that it can be executed by any user without "sudo"? If I run the program with "sudo", then the output files are owned by "root", which adds more complexity to my program. Please help, thanks.</p>