Copying to a USB stick
by GPGAgent from LinuxQuestions.org on (#6KQT6)
Title says it all, sounds dead easy, but I have problems doing this
I want to use the commandline and here is what happens.
Plug in USB stick
df -h shows this:
Code:/dev/sdc1 29G 16K 29G 1% /media/jonke/A239-DFE4I want to mount it as /media/OTR_MMSCIFI so I did this:
Code:sudo mkdir /media/OTR_MMSCIFII had to use sudo because I didn't have permission under my login
Then I unmounted sdc1
Code:umount /dev/sdc1df -h shows sdc1 is unmounted
I mounted it
Code:sudo mount /dev/sdc1 /media/OTR_MMSCIFIdf -h shows it is
Code:/dev/sdc1 29G 16K 29G 1% /media/OTR_MMSCIFIThen I copy a file
Code:cp OTHERWORLDS.png /media/OTR_MMSCIFIAnd I get this:
Code:cp: cannot create regular file '/media/OTR_MMSCIFI/OTHERWORLDS.png': Permission deniedFair enough it's owned by root
So I issued
Code:sudo cp OTHERWORLDS.png /media/OTR_MMSCIFI entered the sudo password an it copied, but everything is owned by root now.
What should I do so I can just use my login to:
Create a mount point
Mount USB
cp folders to USB
Seems a reasonable thing to do
I'm guessing the mount point is the issue because I don't have permission with my login to create a folder in /media
I want to use the commandline and here is what happens.
Plug in USB stick
df -h shows this:
Code:/dev/sdc1 29G 16K 29G 1% /media/jonke/A239-DFE4I want to mount it as /media/OTR_MMSCIFI so I did this:
Code:sudo mkdir /media/OTR_MMSCIFII had to use sudo because I didn't have permission under my login
Then I unmounted sdc1
Code:umount /dev/sdc1df -h shows sdc1 is unmounted
I mounted it
Code:sudo mount /dev/sdc1 /media/OTR_MMSCIFIdf -h shows it is
Code:/dev/sdc1 29G 16K 29G 1% /media/OTR_MMSCIFIThen I copy a file
Code:cp OTHERWORLDS.png /media/OTR_MMSCIFIAnd I get this:
Code:cp: cannot create regular file '/media/OTR_MMSCIFI/OTHERWORLDS.png': Permission deniedFair enough it's owned by root
So I issued
Code:sudo cp OTHERWORLDS.png /media/OTR_MMSCIFI entered the sudo password an it copied, but everything is owned by root now.
What should I do so I can just use my login to:
Create a mount point
Mount USB
cp folders to USB
Seems a reasonable thing to do
I'm guessing the mount point is the issue because I don't have permission with my login to create a folder in /media