美文网首页
2022-10-25-📁📁 rsync更改chmod 权限

2022-10-25-📁📁 rsync更改chmod 权限

作者: 沐深 | 来源:发表于2022-10-25 18:10 被阅读0次

最近碰到一个问题,scp 文件上传到服务器没有权限。

scp,rsync

scp 没有权限参数,使用另一个工具 rsync,可以在上传中配置文件权限。

复杂写法

rsync --perms --chmod=u+rwx ./testfile ./testfile2
rsync --perms --chmod=g+rwx ./testfile ./testfile2
rsync --perms --chmod=o+rwx ./testfile ./testfile2

.e. add (+) permissions for user (u), group (g) or other (o) respectively.
Also (a)=all is successful:

简单写法

sudo rsync --perms --chmod=a+rwx ./testfile ./testfile2

or

sudo rsync --perms --chmod=ugo+rwx ./testfile ./testfile2

文件权限表

最高权限

chmod -R 777 dictionary/file

相关文章

网友评论

      本文标题:2022-10-25-📁📁 rsync更改chmod 权限

      本文链接:https://www.haomeiwen.com/subject/kllozrtx.html