[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.
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.
If you're doing this as a regular user and the USB is a variation of FAT types like FAT16, FAT32, etc you can write to it since FAT requires no permissions. However, if the USB is formatted with one of linux filesystems types, you'd need to be the owner or part of the group to read/write to it as a regular user.
Quote:
Originally Posted by Chrisroot
ok, mkdir /media/usb-drive, cannot create directory, No such file or directory
You got this error because you tried to create a folder in a non-existent parent directory called /media.
Use a -p with mkdir to correct this
Code:
mkdir -p /media/usb-drive
Here is what the -p does from the mkdir --help
-p, --parents no error if existing, make parent directories as needed
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363
Rep:
Quote:
Originally Posted by DDukes
@OP
Are you doing this as root or as a regular user?
If you're doing this as a regular user and the USB is a variation of FAT types like FAT16, FAT32, etc you can write to it since FAT requires no permissions. However, if the USB is formatted with one of linux filesystems types, you'd need to be part of the group to read/write to it as a regular user.
Hey DD ... the OP's USB is formatted FAT32 LBA - see one the previous posts ..
It's probably mounted somehow, we're just waiting for the OP to post the output of some commands to confirm that as well as the mount point.
Hey everyone, yes the mount point is incorrect. Right now i typed the following command "mount /dev/sdc1 /media/usb-drive/". The mount point has been created but the output i get is saying that mount /dev/sdc1 /media/usb-drive/ does not exist, but it does.
Are you already root, or would you need to use the sudo command to be able to complete the mount. Normally you need root privileges to accomplish a mount.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363
Rep:
Quote:
Originally Posted by Chrisroot
Comamnd - findmnt /dev/sdc1 command not found. So im guessing it isn't mounted at the moment.
No, oddly, that means the command is not available on your Gentoo server .. This is the 2nd time a rather ubiquitous command has not been found (lsblk being the other one).
Just for clarity - you are currently logged in to the Gentoo server as root, right ? You are not using some kind of live ISO ?
I'm stumped as to why some of these commands aren't available ...
No that means the findmnt command is not available, in your PATH, or on your system.
Let's back up for a second here:
To be able to copy into or out of a drive, that drive needs to be mounted, and you need to have privileges to be able to read and write to it.
Say the drive is /dev/sdc, and say further that the drive has a name string which was given when the filesystem was created, such as "12345". This drive if auto-mounted should show under /mnt or /media in a directory which matches the name "12345", or it will use a name matching some other attributes of the mounted file system, such as some long hex-ascii string.
Things you can do when you plug in a disk are to:
Issue the "mount" command to see if it is mounted, in fact you can do that before, then plug in the drive, then issue the mount command again, and see if you see the drive mounted
You can look at your system log to see if /dev/sdc was recognized and some additional records to determine if it was auto-mounted
If not auto-mounted, you can then try to manually mount it using the "mount" command, one possible example would be: "mount -t <file system type> /dev/sdc1 /mnt/<name>"
If the drive is mounted, and you are root as you say you are, you should check the ownership of the /mnt or /media subdirectory, for instance if it is mounted at /mnt/drive_1 then check the ownership and group for the /mnt tree by going to there and doing "ls -l", it should be root and you should at least have rwx privileges for the directory.
Same applies to the files or directories under that mounted directory, you should have privileges to access, read, and write there.
Seeing as you're root, this would seem to be no problem, however it is worth checking
I feel that you need to understand first if this is mounted, and then diagnose how to get it mounted, if it is not mounted.
Yes, i am logged in as root currently. And yes it is a a Gentoo server not a live ISO. Is there a way to install some of these simple commands? I know this shouldn't be this difficult.
Yes, i am logged in as root currently. And yes it is a a Gentoo server not a live ISO. Is there a way to install some of these simple commands? I know this shouldn't be this difficult.
Please type "mount" and post the result of that command
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.