[SOLVED] Cant copy files from Gentoo server to USB drive.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
ls -l /opt/biweb/app has a total 160, the whole tree is there which im trying to copy, sorry there is a lot to type.
ls -l /mnt/drive_c total 4-----drwxrwxr-x 32 root 4096 Mar 29 10:17app
And yes, i am logged in as root.
... Sorry - I didn't realize you were communicating via a different computer and were unable to cut and paste ... Could you just zero in on the permissions information, the "drwxrwxr-x" fields ... What I'm trying to figure out is whether there is something preventing you from reading the contents of that directory ...
Those fields are organized in triads .. i.e. : rwx rwx rwx, even though there are no spaces in actuality. They specify the permissions for, respectively, the owner, the group, and everyone else. What is important, is that you have read (r) and execute (x) permissions. As root, you are probably the owner, so the first triad is likely to be the important one.
I'm concerned about the owner and group for the mount directory.
However, for now, can you successfully do the following?
Code:
# cd /mnt/drive_c
# mkdir temp
# ls -l
<results should show directory temp as well as the ownership, group, and privileges for it, I'd like to see that one line result>
# echo 1 > test.txt
# ls -l test.txt
# cat test.txt
<result should be that text.txt is there as a file, I'd like to see the ls -l listing of it, and I'd like to see if it has '1' within it.>
These experiments will verify that you can create files and directories under the mounted disk.
Alright, I typed command cp -r /opt/biweb/app /mnt/drive_c/
it took a bit of time then i went through mnt
root-cd /mnt
mnt # ls
drive_c sd1 sda1 sdb1 sdi sdn
mnt# cd /drive_c
drive_c # ls
app
drive_c # ls app
All the files i need are copied, BUT when i unmount the device. umount /mnt/drive_c, Output- Device not mounted-
Then plug the device into a windows machine, there is nothing there.
... sorry again for being imprecise ... by "first triad", I meant the first 3 letters (excluding the d, which is only there for directories ..) - they specify owner permissions.
For now, concentrate on the tests that rtmistler has suggested - this will eliminate any possibility of insufficient permissions on the mount point (which is your USB drive). I also find the owner of the mount point (user "32", group "root") surprising ...
Any ideas here, rtmistler ? The files and directories seemed to have been copied to the USB drive, but Chrisroot is then unable to see them when it is plugged into a Windows computer. Since the drive is formatted type c (FAT32 LBA W95), shouldn't this be possible ?
The result of the umount command is also surprising ...
Command---cd /mnt/drive_c
drive_c---mkdir temp
drive_c---ls -l
total 8
drwxrwxr-x 32 root root 4096 Mar 29 app
drwxrwxr-x 2 root root 4096 Mar 29 temp
That looks good. I would say then that something goes astray when you try to copy an entire structure. I've seen that there are symbolic links in there. Perhaps you can copy one file or a few files or one single sub-directory where there are no symbolic links. Perhaps you can try that, then umount the disk and bring it to another machine and verify that the files are there. Also verifying that the temp directory is similarly there.
Note that you need to wait for the umount command to complete, which is bring you back to the prompt, and that it should be "umount /mnt/drive_c" where you also are not within any directories under that hierarchy. And then when you put the disk back in, you'll need to mount it again using the mount command shown earlier by me.
EDIT: I agree that the result of the umount command is a concern. This comes together with my notes to make sure you umount and then redo the mount as you unplug and re-plug the drive into your system. It will never auto-mount, you have to mount it each time you attach it. And before you detach it you should issue the umount command.
I do apologize, I will be in meetings for a bit and then done for the day, I'll monitor this thread, but likely may not be able to return to it until the morning. Hopefully you get some success.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.