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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
03-29-2017, 10:36 AM
|
#46
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Chrisroot
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.
|
|
|
03-29-2017, 10:57 AM
|
#47
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep:
|
Command ---cp /opt/biweb/app/. /mnt/drive_c/......output-- omitting directory.
|
|
|
03-29-2017, 10:59 AM
|
#48
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Chrisroot
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,
|
|
|
03-29-2017, 11:16 AM
|
#49
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep:
|
Command- cp -r /opt/biweb/app/. /mnt/drive_c/-----operation not permitted.
|
|
|
03-29-2017, 11:25 AM
|
#50
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Chrisroot
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.
|
|
|
03-29-2017, 11:37 AM
|
#51
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep:
|
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.
|
|
|
03-29-2017, 11:56 AM
|
#52
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Chrisroot
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.
|
|
|
03-29-2017, 12:24 PM
|
#53
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep:
|
The first triad is- drwxrwxr-x
|
|
|
03-29-2017, 12:30 PM
|
#54
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,894
|
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.
|
|
|
03-29-2017, 12:31 PM
|
#55
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep:
|
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.
|
|
|
03-29-2017, 12:38 PM
|
#56
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
Quote:
Originally Posted by Chrisroot
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 ...
|
|
|
03-29-2017, 12:38 PM
|
#57
|
Member
Registered: Mar 2017
Posts: 52
Original Poster
Rep:
|
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
|
|
|
03-29-2017, 12:47 PM
|
#58
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
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 ...
|
|
|
03-29-2017, 01:06 PM
|
#59
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,894
|
Quote:
Originally Posted by Chrisroot
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.
|
|
|
03-29-2017, 01:41 PM
|
#60
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep:
|
The drive wasn't mounted at copy time, all files went into a subdirectory in /mnt/. And, FAT does not support symlinks ...
|
|
|
All times are GMT -5. The time now is 08:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|