I want to clear the fast-cgi cache from the ssh command line. I can do this without difficulty if I log in as root and issue the command
v-delete-fastcgi-cache user example.com
However, if I log in as another ssh user (with sudo privileges) and type
v-delete-fastcgi-cache user example.com
I get the error “user user doesn’t exist”. If I type
sudo v-delete-fastcgi-cache user example.com
I get the error “sudo: v-delete-fastcgi-cache: command not found”.
Does this mean that I can only run this (and other CLI commands?) as root user? I have checked the file permissions, and although the file /usr/local/hestia/bin/v-delete-fastcgi-cache belongs to the root user, its permissions allow any user to execute it (755).
I would actually like to execute this command from a php script, so I should imagine that doing that would require being able to execute it as another user other than root.
Any guidance would be appreciated!