LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-29-2017, 10:36 AM   #46
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511

Quote:
Originally Posted by Chrisroot View Post
Sorry to bother you all again,

command typed- cp -r /opt/biweb/app/ /mnt/drive_c/ -------Output- cannot create symbolic link- Operation not permitted.
I believe your syntax is incorrect:

cp /opt/biweb/app/. /mnt/drive_c/

***EDIT***

Just realized I made a typo (forgot the recursive option -r) ... The correct command is:

cp -r /opt/biweb/app/. /mnt/drive_c/

Last edited by Rickkkk; 03-29-2017 at 10:56 AM.
 
Old 03-29-2017, 10:57 AM   #47
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
Command ---cp /opt/biweb/app/. /mnt/drive_c/......output-- omitting directory.
 
Old 03-29-2017, 10:59 AM   #48
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Chrisroot View Post
Command ---cp /opt/biweb/app/. /mnt/drive_c/......output-- omitting directory.
... Please see my edit above ... I made a typo - sincere apologies ... The corrected command:

cp -r /opt/biweb/app/. /mnt/drive_c/

Cheers,
 
Old 03-29-2017, 11:16 AM   #49
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
Command- cp -r /opt/biweb/app/. /mnt/drive_c/-----operation not permitted.
 
Old 03-29-2017, 11:25 AM   #50
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Chrisroot View Post
Command- cp -r /opt/biweb/app/. /mnt/drive_c/-----operation not permitted.
Hey Chrisroot - this is a bit of a surprise. You are still logged in and executing this command as root ?

Could you post the output of these commands:

ls -l /opt/biweb/app

... and ...

ls -l /mnt/drive_c

Thx.
 
Old 03-29-2017, 11:37 AM   #51
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-29-2017, 11:56 AM   #52
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Chrisroot View Post
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.
 
Old 03-29-2017, 12:24 PM   #53
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
The first triad is- drwxrwxr-x
 
Old 03-29-2017, 12:30 PM   #54
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,894
Blog Entries: 13

Rep: Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945
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.
 
Old 03-29-2017, 12:31 PM   #55
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-29-2017, 12:38 PM   #56
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Chrisroot View Post
The first triad is- drwxrwxr-x
... 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 ...
 
Old 03-29-2017, 12:38 PM   #57
Chrisroot
Member
 
Registered: Mar 2017
Posts: 52

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-29-2017, 12:47 PM   #58
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
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 ...
 
Old 03-29-2017, 01:06 PM   #59
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,894
Blog Entries: 13

Rep: Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945
Quote:
Originally Posted by Chrisroot View Post
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.

Last edited by rtmistler; 03-29-2017 at 01:08 PM.
 
Old 03-29-2017, 01:41 PM   #60
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
The drive wasn't mounted at copy time, all files went into a subdirectory in /mnt/. And, FAT does not support symlinks ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot copy files to USB flash drive from internal HDD. erik2282 Linux - Desktop 8 10-04-2014 12:23 PM
Can I copy files from a ntfs drive on ubuntu server? Vodkaholic1983 Linux - Newbie 7 05-05-2013 06:03 AM
How to copy files from a usb pen drive to my linux box? HelpMe2877 Linux - Newbie 4 08-20-2008 02:54 AM
Copy Files From Lexar USB Drive In Slackware 12.1 OWA14 Linux - Newbie 3 05-27-2008 06:50 PM
copy files from your hard drive to usb key with Knoppix ziegen Linux - Distributions 1 08-09-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration