Situation
On a CentOS system, as root user, which rsync
gives me the following output:
/usr/bin/rsync
The permissions of that binary are as follows:
-rwxr-xr-x 1 root root 415000 31. Okt 09:36 rsync*
If I understand correctly, this file is executable for its owner, the owner's group as well as for anybody else. However, being logged in as a regular user, which rsync
gives no output and ls -l /usr/bin/rsync
says:
/bin/ls: (...) No such file or directory
It is impossible to execute rsync – the command is not found, neither by calling rsync
nor /usr/bin/rsync
:
-bash: /usr/bin/rsync: No such file or directory
Trying to which rsync
through an SSH tunnel:
$ ssh user@host which rsync
which: no rsync in (/usr/local/jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin)
$ ssh root@host which rsync
/usr/bin/rsync
Question
What are the necessary steps to make /usr/bin/rsync
executable for a given non-root user?
Further information (that may or may not be relevant)
- This system is a remote server
- I want to call
rsync
from a local shell script, likersync [parameters] user@host:/some/dir .
- The shell script will be run automatically and authentication of "user" will be done by SSH key
Update/Solution
Turns out I was mistaken and the system is running on CloudLinux, not CentOS. Apparently, CloudLinux allows to deactivate tools for regular users, which was the case for rsync. My apologies for the misinformation!
(Unfortunately, I can't tag this question with "cloudlinux" due to insufficient reputation.)