I have a machines A
B
C
. only Machine B
have access to A
& C
. For machine A
I have root access , machine B
I have root access and for machine C
I have User level access.
1.2.3.4 is the ip address assigned to machine B
.
When I am doing from machine A
as
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
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 i.e 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
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.
can anybody help to do so ??
Advertisement
Answer
before doing SCP I have changed permission of the logs folder to 777 i.e chmod -R 777 ./logs and now I can able to delete the folder created by scp at Machine C