Hi,

I had this problem because of SELinux. Rsync can act as both a daemon
and a client, and SELinux treats it as a daemon when running under
slurm. There are restrictions in the default SELinux policy on RHEL 6 to
limit its access as a daemon.

If you are only using rsync as a client, you can disable the protections by
adding the bin_t SELinux context to the rsync executable. (ref: 
http://danwalsh.livejournal.com/61646.html )

sudo semanage fcontext -m -t bin_t /usr/bin/rsync
sudo restorecon /usr/bin/rsync
Confirm: ls -lZ /usr/bin/rsync | grep bin_t

Note: first command requires absolute path.

Cheers,
Marius


On 10/16/2015 08:32 PM, James Board wrote:
>
> Hello,
>
> I submit a simple batch script to SLURM which simply tries to rsync a 
> directory from LocalMachine to RemoteMachine.  The rsync command looks like 
> this:
>
>     /usr/bin/rsync -a 'username@LocalMachine:/home/username/RunDirectory 
> /home/username/RunDirectory'
>
> The above rsync command works when I run it at the command line from the 
> RemoteMachine.  However, when I submit the script which contains the rsync 
> command with sbatch, it fails with an error message:
>     permission denied, please try again.
>
> Does anyone know why an rsync command might fail from inside a SLURM batch 
> script?
>

Reply via email to