[英]How to delete target folder created using scp by target user
I have a machines A
B
C
. 我有一台机器A
B
C
only Machine B
have access to A
& C
. 只有Machine B
可以访问A
& C
。 For machine A
I have root access , machine B
I have root access and for machine C
I have User level access. 对于machine A
我具有root访问权限,对于machine B
我具有root访问权限,对于machine C
我具有用户级别访问权限。
1.2.3.4 is the ip address assigned to machine B
. 1.2.3.4是分配给machine B
的IP地址。
When I am doing from machine A
as 当我从machine A
做
scp -pr ./logs/ root@1.2.3.4:/common/tftpboot/
It creating folder name logs
inside <machine C>:/common/tftpboot/
I have given all read
write
execute
permission to all user
groups
and others
as machine A
is comes under others using chmod 777 tftpboot
它创建的文件夹名称logs
内<machine C>:/common/tftpboot/
我已经给所有read
write
execute
所有许可的user
groups
和others
作为machine A
是来自下他人使用chmod 777 tftpboot
Now after copying logs
folder I am not able to delete the <machine C>:/common/tftpboot/logs/
folder from User
of machine C
though machine C user
has given the 777 permission to /common/tftpboot/
folder as the logs
folder is created by others ie machine A root
现在,复制后logs
文件夹,我不能删除<machine C>:/common/tftpboot/logs/
来自文件夹User
的machine C
虽然machine C user
给予777权限/common/tftpboot/
文件夹中的logs
文件夹由其他人创建,即machine A root
So I want to do scp to copy the folder only (and not individual files) and still I want that user c
should able to delete the folder created by machine A
scp
after analysing logs 所以我想做scp只复制文件夹(而不是单个文件),但我仍然希望user c
在分析日志后应该能够删除machine A
scp
创建的文件夹
Now I need to do ssh to Machine B
from Machine A
and then only I can able to delete the scp
created logs folder. 现在,我需要从Machine A
到Machine B
ssh,然后只有我才能删除scp
创建的日志文件夹。
can anybody help to do so ?? 有人可以帮忙吗?
在执行SCP之前,我已将日志文件夹的权限更改为777,即chmod -R 777 ./logs,现在我可以删除在Machine C
由scp创建的文件夹了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.