Program to let any user run a command
This looks a bit unclear:


const int one = 1;



It's primarily used as the option_value argument of setsockopt().  Consider renaming this to something more clear so that it doesn't leave readers confused.
In addition to your other error-checking, you can also check the return value of socket() and print its error in case it fails.
A little nit-picky, but you can just initialize fd after the command line check instead of declaring it first and then assigning to it:

int fd = setup_socket();