LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot copy data from a second disk (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-copy-data-from-a-second-disk-784711/)

Papa Echo 01-25-2010 05:58 PM

Cannot copy data from a second disk
 
Hi,
I have a PC with OpenSuse 11.1. Beside root there are two other users on the system.

Now I have installed a new PC with OpenSuse 11.2. Only one user is set up until now. I installed the hard disk from OpenSuse 11.1 into the new PC on IDE Primary Slave, because I wanted to copy some files from the old system. OpenSuse 11.2 has mounted the old disk automatically in /media/disk and /media/disk-1.
The problem is that I can’t find any files or directories from the users. I could find only one file from root in /media/disk-1/root/Desktop.
Why can’t I see the files? Does it have anything to do with UID or SUID?

raju.mopidevi 01-25-2010 08:40 PM

I think there may be access permission issues with them. You can access them using root.

Papa Echo 01-25-2010 11:36 PM

Well, I worked as root on the OpenSuse 11.2 system to copy the files, but I can’t find them. I installed the disk with OpenSuse 11.1 back to the other system and checked the permissions and they are all set to –rw-r—r--.
Any other suggestions?

raju.mopidevi 01-26-2010 01:23 AM

have you checked the exact location ? please mention the location so that we can understand why their permissions are set to 644.

worm5252 01-26-2010 01:49 AM

I am gonna make a simple suggestion in hopes to keep anyone from over thinking the problem here.

why not bring up both systems and just copy the files via scp?

scp requires that openssh is installed and running on the source PC. in this case the Suse 11.1 PC would be the source pc.

As long as that is running you can run the following command.

Code:

scp root@<source PC IP address>:<file to be downloaded> <location to save the file>
so say I want to download file1 from 10.1.1.2 and save it to /home/user/downloads/. I could run this command

Code:

scp root@10.1.1.2:file1 /home/user/downloads/

Papa Echo 01-26-2010 03:07 PM

Before I had the idea to connect the old hard disk to the new PC, I tried to transfer the files via the network. I tried samba, NFS, FTP and now scp, but nothing worked. I can ping each PC, but I don’t know how to set up the other services. Maybe I must configure the firewall?

worm5252 01-26-2010 03:19 PM

hardware firewalls usually do not apply to internal traffic. Only external traffic. However if the PC's themselves have a firewall like iptables installed then that could be a problem. on the old PC install openssh by running this command as root.

Code:

yum install openssh-server
Once you have openssh installed scp should work just fine. The first time you run scp you should get a message about accepting the RSA certificate and you must type yes or no to continue. then it should prompt for a password. Once you enter the password it will transfer the file. Here is an example of what I am talking about.

Code:

TESTLAB:~# scp root@10.1.1.20:/home/jared/Downloads/README /root/
The authenticity of host '10.1.1.20 (10.1.1.20)' can't be established.
RSA key fingerprint is e1:63:44:61:a5:3b:8e:bb:90:e3:bf:df:dd:2f:a3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.1.20' (RSA) to the list of known hosts.
root@10.1.1.20's password:
README                                        100% 3654    3.6KB/s  00:00
TESTLAB~:# ls /root
README
TESTLAB:~#

That was the first time that machine has ever done an scp connection to 10.1.1.20 and it asked about the RSA key. From now on if I do an scp connection to 10.1.1.20 it will just prompt for the password.

Papa Echo 01-26-2010 03:34 PM

I just tried:
Code:

yum install openssh-server
bash: yum: command not found

What's next?

worm5252 01-26-2010 03:38 PM

yum is a package manager therefore you must be root or have root privileges to use it.

try changing to root first by typing su

Papa Echo 01-26-2010 03:50 PM

I am logged in as root on OpenSuse 11.1.

worm5252 01-26-2010 04:33 PM

Oh the problem is my fault, I haven't used Suse since version 10. Looks like they changed the package manager to zypper. Try this command instead

Code:

zypper install openssh-server

Papa Echo 01-26-2010 04:56 PM

openssh-server is not found on my system. I have a standard installation of OpenSuse 11.1. What can I do?

worm5252 01-26-2010 05:11 PM

probably a different package name in the Suse repositories.

Try these and see if one of them works

Code:

zypper install openssh
or

Code:

zypper install ssh
Sorry for the confusion. Like I said, I haven't used Suse since version 10. I mainly use Debian so it is a different package manager and different repositories all together.

Papa Echo 01-27-2010 12:24 AM

@worm5252: Thank you for your support.

I have tried: 'zypper install openssh' and the answer was: 'openssh' is already installed.

But I couldn’t copy anything from OpenSuse 11.1. This was the message:
ssh: connect to host 192.168.5.1 port 22: Connection timed out

Now I opened port 22 in the firewall on tcp and udp manually. Then it worked.


All times are GMT -5. The time now is 04:13 AM.