This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

rsync client unable to create file in /var/run

Synchronize files & directories to/from XigmaNAS with minimal data transfer.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
ijeffsc
Starter
Starter
Posts: 23
Joined: 05 Dec 2015 13:11
Location: NY, ON, Krabi Thailand
Status: Offline

rsync client unable to create file in /var/run

Post by ijeffsc »

This seems to be failing silently on my system.

The scripts created in /var/run have logic to ensure long running cron jobs do cause duplicate runs. Specific example:

Code: Select all

if [ -r /var/run/rsync_client_running_7e5ccef4-427f-4fda-8b70-284df8e05dc0 ]; then
/usr/bin/logger -p local4.notice "Previous client synchronization still running... exiting"
exit
fi
/usr/bin/touch /var/run/rsync_client_running_7e5ccef4-427f-4fda-8b70-284df8e05dc0
This should create the "running" file in /var/run.

If the rsync client is running as an ordinary user however that user does not appear to have permission to create files in that directory. Can anyone reproduce this to verify? I believe this would be the case for any rsync configuration running as an ordinary user.

My temporary workaround is to put the ordinary user in the wheel group and modify /var/run to 775 permissions however I don't think this will survive a reboot.
NAS4Free 10.3.0.3 (2617)
Intel Corporation D525MW 4GB
Promise SATA 300 TX4
HGST HTS721010A9E630 X 3 TOSHIBA MQ01ABD100 x2 + spare ZFS R5

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: rsync client unable to create file in /var/run

Post by Parkcomm »

It sounds like the script does not have root privlideges
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

ijeffsc
Starter
Starter
Posts: 23
Joined: 05 Dec 2015 13:11
Location: NY, ON, Krabi Thailand
Status: Offline

Re: rsync client unable to create file in /var/run

Post by ijeffsc »

Yes that is correct.

The rsync GUI configuration allows you to run as an ordinary user. I generally avoid root whenever possible.

When you select the ordinary user the scripts generated fail silently. For really big rsyncs especially when starting off they can run a long time and you don't want them clobbering each other. The generated scripts are pretty nice but they don't seem to account for the permissions in /var/run.
NAS4Free 10.3.0.3 (2617)
Intel Corporation D525MW 4GB
Promise SATA 300 TX4
HGST HTS721010A9E630 X 3 TOSHIBA MQ01ABD100 x2 + spare ZFS R5

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: rsync client unable to create file in /var/run

Post by Parkcomm »

Jeffsc - I've been travelling this week (In Port Moresby right now) and have not tried to replicate the issue. I'll give it a go on the weekend when I'm home.
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

Post Reply

Return to “RSYNC”