The outlet shown in the image below doesn't have a ground wire connecting to its receptacle. A friend of mine is helping me setup a ups that requires ground wire, however what he did was run a ground wire from the basement and connect it to three way prong which plugs into a wall socket adapter. While this did turn off the warning light on the ups, it doesn't however keep the warning light off the if the ups is connected directly to the wall socket adapter. It only turns off the warning light when the ups is connected to surge protector 1, and being able to only connect it the surge protector causes other issues with the ups.
This really doesn't feel safe at all to me, which is why I haven't used this setup yet. So the question is, how unsafe is this, and how does this setup work/manage to turn off the warning light on the ups?