Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an rsync setup that transfers files from my local development machine to my production web server. On the production server, the storage directory needs to be 775.

When the rsync completes, it gets changed to 755

share|improve this question

1 Answer 1

up vote 1 down vote accepted

From man rsync:

-p, --perms                 preserve permissions

Assuming that you want to preserve all metadata and not just permissions, you probably want to use -a with -HAX, which implies -p.

-a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.