Change to different user, or let different user execute a command
Posted
by
WG-
on Super User
See other posts from Super User
or by WG-
Published on 2014-08-24T21:59:58Z
Indexed on
2014/08/24
22:23 UTC
Read the original article
Hit count: 225
I have a problem. There is a server which I can access with an account by ssh, lets say WG. Now there is a folder with the following permissions.
drwxr-s---+ 855 vvz www-data 20K Aug 21 17:56 pictures
I want to copy this folder using rsync, however since I am not the user www-data but WG I cannot execute rsync. So I want www-data to execute a rsync command.
However, I do not posses sudo powers. My friend however tells me that I am actually able to execute the rsync command as www-data, but he will not tell me how.
I asked him for some clues and he told me that it had something to do with reverse shell (which I figured out to be that you connect by ssh to your server and then you connect back to your own server, or something). I also asked if it was by-design or actually a flaw in the system. He tells me it is both.
Furthermore I think it has something to do with the group permissions. If I just make sure that I am with the group permissions then I can also read the files.
Anybody has a clue?
© Super User or respective owner