Results 1 to 10 of 10
Hello,
I want to copy a .tgz file from my computer to an external hard drive. However, I get the following message:
cp: cannot create regular file `/mnt/usbkey/ws_2008/misc/minipar-0.5-W indows.tgz': Permission ...
- 11-21-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
copying files to an external hard drive
Hello,
I want to copy a .tgz file from my computer to an external hard drive. However, I get the following message:
cp: cannot create regular file `/mnt/usbkey/ws_2008/misc/minipar-0.5-W indows.tgz': Permission denied
I get this error with any file I try to copy to the external disk.
My external disk is recognized, when I mount it, I can see the files and folder I have there, but seems that I cannot copy anything to it.
When I try to copy the same files from my computer to a usb flash drive, everything works fine.
Any help or hints what to do is appreciated. Thank you.
- 11-21-2008 #2Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
Hi again,
I can read everything from the external drive, but I cannot write. I have tried the following:
(to change the ownership):
chown -R [myUserName] [the folder where I have mounted the drive]
(to change the permissions to the files in the folder where I have mounted the drive):
chmod -R 775 [the folder where I have mounted the drive]
When I ran the chmod command, I get the following for each file and folder in the mounted directory:
chmod: changing permissions of `usbkey/ws_2008/fileName': Operation not supported
What could I do? Thanks.
- 11-22-2008 #3
The USB is formatted for either fat16 or fat32. Maybe you external hardrive is formatted for NTFS instead.
Another thing to look at is when it is mounted, is it mounted as read only. You may have to mount it manually as read and write.Linux Registered User # 475019
Lead,Follow, or get the heck out of the way
AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
Open CourseWare for Linux Geeks
- 11-22-2008 #4
post two things:
in terminal type sudo fdisk -l
then also post the content of your fstab, in terminal type
gedit /etc/fstabBodhi 1.3 & Bodhi 1.4 using E17
Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17
"The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"
- 11-22-2008 #5Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
Hello,
here is what I get when I type fdisk -l:
Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1913 15366141 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 1914 4710 22466902+ 83 Linux
/dev/sda3 4711 4864 1237005 82 Linux swap
Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 5099 40957686 7 HPFS/NTFS
/dev/sdb2 5100 14593 76260555 7 HPFS/NTFS
Here is what my fstab file contains: (the gedit command doesn't work for me: bash: gedit: command not found)
/dev/sda3 swap swap defaults 0 0
/dev/sda2 / ext3 defaults 1 1
/dev/sdb1 /mnt/usbkey auto defaults,user,noauto,unhide 0 0
/dev/sda1 /mnt/windows ntfs ro 1 0
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
Best regards
- 11-22-2008 #6Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
the 'user' is replaced with my user name.
- 11-23-2008 #7
Change this line of the /etc/fstab file.
To thisCode:/dev/sdb1 /mnt/usbkey auto defaults,user,noauto,unhide 0 0
You must be root user to save these changes. Do let us know how it goes.Code:/dev/sdb1 /mnt/usbkey auto defaults,user,noauto,unhide,umask=0 0 0
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 11-23-2008 #8Just Joined!
- Join Date
- Sep 2008
- Posts
- 32
Hi,
I have added the umask=0, and saved the changes as root, but unfortunately, it doesn't work. So, when I try copying a file from my home dir to the external drive, I get:
root@darkstar:~$ cp file1.txt /mnt/usbkey/
cp: cannot stat `/mnt/usbkey/file1.txt': Permission denied
I also tried this being logged from my user name, but it doesn't work, I get:
mount: only root can do that
At the moment I do mount the drive and can make changes to files from the drive - the changes are accepted. But I cannot copy anything from my home folder to the external drive. (the files have the a+rw permissions).
Regards
- 11-23-2008 #9
You might need to install ntfs-3g, which distro are you using?
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 11-23-2008 #10
Do the following:
change
/dev/sdb1 /mnt/usbkey auto defaults,user,noauto,unhide 0 0
to this
/dev/sdb1 /mnt/usbkey auto defaults,user,rw 0 0
then do the following in terminal
sudo chmod 777 /mnt/usbkey
reboot and you should be good to goBodhi 1.3 & Bodhi 1.4 using E17
Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17
"The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"


Reply With Quote