Mysterious Change In Directory Ownership And Removal Of The Execute Bit On Directory

Home » CentOS » Mysterious Change In Directory Ownership And Removal Of The Execute Bit On Directory
CentOS 1 Comment

In the following sequence of commands, you can see directory /7.2.1511/
will change of ownership to another user and the execute bit is removed. This user, lbfay, is actually my own user but I am not logged on the server while running rsync with root.

[root@ctsrepocos ~]# who root tty1 2016-07-22 10:40

[root@ctsrepocos ~]# ls -l /share/CentOS/
total 476
lrwxrwxrwx. 1 apache apache 9 Dec 15 2015 7 -> 7.2.1511/
*drwxr-xr-x*. 13 *apache apache *4096 May 18 12:48 7.2.1511

[root@ctsrepocos ~]# /usr/bin/rsync -a -vvv –delete –delete-excluded
–exclude “local” –exclude “isos” –exclude “*.iso” –exclude “xen4”
–exclude “*.i686.*” –exclude “i386” –exclude “atomic” rsync://
CentOS.mirror.iweb.ca/CentOS/7.2.1511 /share/CentOS

[root@ctsrepocos ~]# ls -l /share/CentOS/
total 476
lrwxrwxrwx. 1 apache apache 9 Dec 15 2015 7 -> 7.2.1511/
*drw-r–r–. *13 *lbfay lbfay *4096 May 18 12:48 7.2.1511

Someone has an idea of what is going on?

Thanks,

One thought on - Mysterious Change In Directory Ownership And Removal Of The Execute Bit On Directory

  • Dohhh…

    -a implies -p, -o and -g which preserve permissions, owner and group. Therefore I chose to use: -r -l -t –devices –specials

    For the benefits of everyone…

LEAVE A COMMENT