Article 561Q8 Umask cron/rsync/sh

Umask cron/rsync/sh

by
RatherLoopy
from LinuxQuestions.org on (#561Q8)
I have a cron job that executes a shell script to rsync data from a remote server to a local drive. Even though I've added "umask 002" to /etc/profile and the cron job owner's .bashrc, when rsync writes directories and files, directories get 755 permissions and files get 644.

How can I get rsync to set 775 & 664 for the directories & files it writes?latest?d=yIl2AUoC8zA latest?i=LFnR5rgNQEw:EhB5qL-v0Gw:F7zBnMy latest?i=LFnR5rgNQEw:EhB5qL-v0Gw:V_sGLiP latest?d=qj6IDK7rITs latest?i=LFnR5rgNQEw:EhB5qL-v0Gw:gIN9vFwLFnR5rgNQEw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments