刚刚同事反映开发机上的测试站点无法访问,提示500错误;直接检查了网站根目录权限,发现变成了000,原来开发人员用rsync从本地同步文件到服务器上时把属性全部改变了,查了查rsyncd.conf的帮助文档,找到incoming chmod这个配置参数。配置后用户同步文件会强制把权限改为server端设定值。
incoming chmod This option allows you to specify a set of comma-separated chmod strings that will affect the permissions of all incoming files (files that are being received by the daemon). These changes happen after all other permission calculations, and this will even override destination-default and/or existing permissions when the client does not specify --perms. See the description of the --chmod rsync option and the chmod(1) manpage for information on the format of this string.
在rsyncd.conf中加上一行: incoming chmod = Du=rwx,Dog=rx,Fu=rwx,Fgo=rx 就会强制把同步以后的目录权限改为755.就解决一目录权限改变的问题。
.abu.点评: 群里聊天时候的一些搜集。
|