Q:

Su -c is not working and ignored

It's explained that if we using su with -c parameter it will pass the command to user's shell and execute it.
But in my environment, it totally ignore's the -c option and change to user's shell.
[root@mftf~]# su - demo -c "ls -la"

[demo@mftf~]$

but if I using -c without any command follow, it will show the error that -c need a argument, so it's not ignored..
I'm using RHEL 7.

A:

When using - (or -l) you invoke an interactive login shell for the specified user.
Depending on what the shell initialization files do for the given user, the command may not be executed.  For example, if they re-execute a shell using exec (without passing the command line parameters from the invoking shell), either directly or through something like tmux or ssh-agent, then the command string would be lost.
For example: I have 
if tmux has-session; then
    exec tmux attach-session
else
    exec tmux
fi

... in my ~/.profile, which is why su -l me some_command won't execute some_command (instead, an interactive shell is started inside tmux).
To execute a command as another user using su just do
# su -c some_command username

From the Ubuntu su(1) manual:

-, -l, --login
Provide an environment similar to what the user would expect had the
         user logged in directly.

Or set up sudo and use
$ sudo -u user some_command

