|
problem with writing into a file using socket(perl)
We are having two servers(linux) : server1 and server2
I want to transfer contents of a file located on server1 to server2.
i m using IO::Socket module for this.
On server1 I have a cgi program sam.cgi having -rwsr-xr-x and owner is root and group is also root.
In this sam.cgi script we are creating the client part of the socket which reads data from a particular file and then transfers that data to server part of the socket which is running and listening on server2.
Data is transfered successfully and it is also printed on console (STDOUT) of server2. But the problem is that we are not able to write that collected data to some file on server2.
I don't know what's the problem?
The script on server2 which is listening the requests is having following rights
-rw-r----- temp1 temp1
where temp1 is the username.
i want to write the transfered data in file on server2: /home/temp1/backup.txt
what i should do?????
|