suid files and bsd

Andrew Flury andrew at
Fri Jan 25 13:10:07 EST 2002

Hi there,

The "s" in the permissions isn't in reference to the setuid bit.  It's
referencing the fact that those files are Unix domain sockets (if
they were setuid, the "s" would be in place of the user's "x", ie
"-rwsr-xr-x").  The reason it is failing is because BSD's mknod
(which rsync uses to create all special files) cannot be used to
create Unix domain sockets.  This also applies to named pipes
A while back, I created a patch for rsync that would use
socket(2)/bind(2) and mkfifo(2) to create those special files on
systems where those functions are available.  You can get the
patch here:

I have not tried applying the patch to 2.5.x.  It's possible that
it would require some tweaking.

Good luck.


>Date: Thu, 24 Jan 2002 10:27:07 -0700
>From: Steve <stephen at>
>To: rsync at
>Subject: suid files and bsd
>	Currently I only have one machine backing up to another. I am
>backing up to a filesystem that is mounted as nosuid. The syncing process
>works perfectly except it fails on files that are suid. 
>mknod tmp/mysql.sock : Invalid argument
>mknod tmp/orbit-daud/orb-12573780511489051058 : Invalid argument
>mknod tmp/orbit-daud/orb-139425434385535813 : Invalid argument
>mknod var/pwcheck/pwcheck : Invalid argument
>mknod var/run/log : Invalid argument
>mknod var/run/ndc : Invalid argument
>mknod var/run/printer : Invalid argument
>srw-rw-rw-   1 root    wheel      0 Jan 23 11:52 log
>srw-------   1 root    wheel      0 Jan 23 11:53 ndc
>srwxrwx---   1 root    wheel      0 Jan 23 11:53 printer
>I would figure that copying the file and setting the file typr would be
>different. Is this the rsyncd that is seeing the file system set nosuid
>or has anyone else run into this sort of problem? I would really rather
>not have suid files allowed on the backup filesystem.
>Systems Administrator  | D i m e n s i o n a l   C o m m u n i c a t i o n s |
>support at        | DSL/V90/K56flex/V34/ISDN/Frame/T1/T3 starts @$25/mo |
>303.285.INET voice     |  info at  |
>888.3.DIMCOM tollfree  | fast reliable internet access for home and business |
>303.609.9373 emergency |  Denver * Boulder * Longmont * Bailey * CO Springs  |

More information about the rsync mailing list