Sample Header Ad - 728x90

rsync not setting stickybit / GID bit

1 vote
3 answers
1668 views
Using the following rsync command, the RWX permissions are being correctly set for both files and directories but the sticky bit options are not. rsync -rtvz --partial-dir=.rsync-partial --chmod=Da+t,Dg+s,D770,F0740 --progress --stats -e 'ssh -p 19419' "/home/me/test_dir" me@REMOTE_HOST:~ I understand that the options should act as below: Da+t - all dirs should have sticky bit set (only the root user, the owner of the directory, and the owner of a file can remove files within said directory.) Dg+s - all dirs should have setGID (all files created within said directory inherit the group ownership of that directory) but sticky bits and setGID bits are not set on the REMOTE_HOST dirs with the above command. If I ssh to the REMOTE_HOST and run something like chmod -R a+t test_dir then the sticky bits will be set as expected. Where am I going wrong? Edit: I also separately tried just "--chmod=Da+t,Dg+s", "--chmod=Da+t" "--chmod=Dg+s" "--chmod=a+t" and no sticky bits are set with any of these options. (Ubuntu 16.04, rsync 3.1.1 - I took the chmod options straight from the man page)
Asked by ezekiel (167 rep)
Nov 10, 2020, 04:02 PM
Last activity: Jul 22, 2022, 04:40 PM