[OpenIndiana-discuss] Problem running rsync with smf service

steve at linuxsuite.org steve at linuxsuite.org
Fri Dec 7 20:19:13 UTC 2012


HOwdy!

         I installed rsync as per the openindiana wiki. The original
/lib/svc/method/rsyncd works fine with smf. I want to
run it from smf as user "nobody"


      ******** summary of problem ************

      I modifed /lib/svc/method/rsyncd. If I run

/lib/svc/method/rsyncd start

      it works fine and runs as expected. If I use

svcadm enable rsyncd

      to start the service it does not run, goes into "maintenance"
condition and logs
error via syslog. The important error seems to be

[ID 702911 daemon.warning] rsync: getcwd(): Permission denied (13)
[ID 702911 daemon.warning] rsync error: errors selecting input/output
files, dirs (code 3) at util.c(1002) [Receiver=3.0.9]

	Shouldn't this "just work" if "/lib/svc/method/rsyncd start"  will run
correctly?? Is this a bug?? Or am  I missing something?

        ********* end summary *************

        Ideas?

        Details below .  thanx - steve


**************** Details *************************



root at live-dfs-1:/var/adm# diff /lib/svc/method/rsyncd
/home/steve/rsyncd-smf
53c53
<                sudo -u nobody $DAEMON --daemon
--config="$RSYNC_CONFIG_FILE" $RSYNC_OPTS
---
>                $DAEMON --daemon --config="$RSYNC_CONFIG_FILE" $RSYNC_OPTS
92c92
<             sudo -u nobody $DAEMON --daemon
--config="$RSYNC_CONFIG_FILE" $RSYNC_OPTS
---
>             $DAEMON --daemon --config="$RSYNC_CONFIG_FILE" $RSYNC_OPTS

root at live-dfs-1:/var/adm# /lib/svc/method/rsyncd
Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart}
root at live-dfs-1:/var/adm# /lib/svc/method/rsyncd start
Starting rsync daemon: rsync.

###### runs correctly

root at live-dfs-1:/var/adm# ps axuw|grep rsy
nobody    1687  0.0  0.0 2764 1404 ?        S 18:26:41  0:00
/usr/bin/rsync --daemon --config=/etc/rsyncd.conf
root      1691  0.0  0.0 2052 1380 pts/1    S 18:26:49  0:00 grep rsy
root at live-dfs-1:/var/adm#
root at live-dfs-1:/var/adm# svcs -a|grep rsy
disabled       17:20:27 svc:/network/rsyncd:default
root at live-dfs-1:/var/adm# kill 1687
root at live-dfs-1:/var/adm# ps axuw|grep rsy
root      1707  0.0  0.0 2052 1380 pts/1    S 18:30:16  0:00 grep rsy
root at live-dfs-1:/var/adm# svcadm enable rsyncd
root at live-dfs-1:/var/adm# echo $?
0

#########  doesn't run

root at live-dfs-1:/var/adm# ps axuw|grep rsy
root      1719  0.0  0.0 2052 1380 pts/1    S 18:32:51  0:00 grep rsy

root at live-dfs-1:/var/adm# tail -n 20 messages

Dec  7 18:32:34 live-dfs-1 rsyncd[1715]: [ID 702911 daemon.warning] rsync:
getcwd(): Permission denied (13)
Dec  7 18:32:34 live-dfs-1 rsyncd[1715]: [ID 702911 daemon.warning] rsync
error: errors selecting input/output files, dirs (code 3) at util.c(1002)
[Receiver=3.0.9]
Dec  7 18:32:34 live-dfs-1 svc.startd[10]: [ID 652011 daemon.warning]
svc:/network/rsyncd:default: Method "/lib/svc/method/rsyncd start" failed
with exit status 3.
Dec  7 18:32:34 live-dfs-1 svc.startd[10]: [ID 748625 daemon.error]
network/rsyncd:default failed: transitioned to maintenance (see 'svcs -xv'
for details)
Dec  7 18:32:34 live-dfs-1 fmd: [ID 377184 daemon.error] SUNW-MSG-ID:
SMF-8000-YX, TYPE: defect, VER: 1, SEVERITY: major
Dec  7 18:32:34 live-dfs-1 EVENT-TIME: Fri Dec  7 18:32:34 EST 2012
Dec  7 18:32:34 live-dfs-1 PLATFORM: PowerEdge-R710, CSN: 3FLRVH1,
HOSTNAME: live-dfs-1
Dec  7 18:32:34 live-dfs-1 SOURCE: software-diagnosis, REV: 0.1
Dec  7 18:32:34 live-dfs-1 EVENT-ID: fdb9e5f9-7d57-4f40-91aa-dadec40f31ef
Dec  7 18:32:34 live-dfs-1 DESC: A service failed - a method is failing in
a retryable manner but too often.
Dec  7 18:32:34 live-dfs-1   Refer to http://illumos.org/msg/SMF-8000-YX
for more information.
Dec  7 18:32:34 live-dfs-1 AUTO-RESPONSE: The service has been placed into
the maintenance state.
Dec  7 18:32:34 live-dfs-1 IMPACT: svc:/network/rsyncd:default is
unavailable.
Dec  7 18:32:34 live-dfs-1 REC-ACTION: Run 'svcs -xv
svc:/network/rsyncd:default' to determine the generic reason why the
service failed, the location of any logfiles, and a list of other services
impacted.







More information about the OpenIndiana-discuss mailing list