LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-03-2009, 04:31 AM   #1
balaji2219
LQ Newbie
 
Registered: Jan 2009
Posts: 16

Rep: Reputation: 0
Thumbs up Copy Directory from CD


Hi Friends,

I am using fedora 10 and have a combo drive. I am mounting dvdrom on folder /root/dvdrom and trying to copy directoris from it then it says Permission denied.

e.g. {root@localhost root}# cp -a /dvdrom/directoryA /root/
Then it gives error:

cp:cannot create directory 'root/directoryA': Permission denied.

but if I copy any file from cd then I am able to do it.

can anyone please tell me why this is happening.
 
Old 07-03-2009, 04:39 AM   #2
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by balaji2219 View Post
Hi Friends,

I am using fedora 10 and have a combo drive. I am mounting dvdrom on folder /root/dvdrom and trying to copy directoris from it then it says Permission denied.

e.g. {root@localhost root}# cp -a /dvdrom/directoryA /root/
Then it gives error:

cp:cannot create directory 'root/directoryA': Permission denied.

but if I copy any file from cd then I am able to do it.

can anyone please tell me why this is happening.
if you mount your dvd in
/root/dvdrom

and you want to copy a directory named directoryA from it
you should

cp -a /root/dvdrom/directoryA /root

(you didn't mount the dvd in /dvdrom, so /dvdrom/directoryA
doesn't exist)
 
Old 07-06-2009, 06:30 AM   #3
balaji2219
LQ Newbie
 
Registered: Jan 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Question No Friend

No Friend,

I had written wrong here but I am giving right in there, it is not allowing to create destination directory whatever I give.


Quote:
Originally Posted by vonbiber View Post
if you mount your dvd in
/root/dvdrom

and you want to copy a directory named directoryA from it
you should

cp -a /root/dvdrom/directoryA /root

(you didn't mount the dvd in /dvdrom, so /dvdrom/directoryA
doesn't exist)
 
Old 07-06-2009, 06:35 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by balaji2219 View Post
Hi Friends,

I am using fedora 10 and have a combo drive. I am mounting dvdrom on folder /root/dvdrom and trying to copy directoris from it then it says Permission denied.

e.g. {root@localhost root}# cp -a /dvdrom/directoryA /root/
Then it gives error:

cp:cannot create directory 'root/directoryA': Permission denied.

but if I copy any file from cd then I am able to do it.

can anyone please tell me why this is happening.
def a permission issue like the error says.
what are the permissions on directoryA at the source end?
 
Old 07-06-2009, 07:00 AM   #5
ssaha
Member
 
Registered: Feb 2009
Location: Kolkata,India
Distribution: Fedora 8,Ubuntu 8.04, 8.10, 9.04, 9.10
Posts: 108

Rep: Reputation: 18
simply drag and drop to copy...i think it should work...
 
Old 07-06-2009, 07:27 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
If there is a permissions issue, then drag and drop is not going to work!!

(I think) creating a directory requires execute (x) permissions in the host directory, whereas creating a file only requires write (w) permissions. Run some tests to see if I've got this right. (I have to get my breakfast.....)
 
Old 07-06-2009, 11:44 PM   #7
balaji2219
LQ Newbie
 
Registered: Jan 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Exclamation FSTab

Quote:
Originally Posted by pixellany View Post
If there is a permissions issue, then drag and drop is not going to work!!

(I think) creating a directory requires execute (x) permissions in the host directory, whereas creating a file only requires write (w) permissions. Run some tests to see if I've got this right. (I have to get my breakfast.....)
I think I am making some mistake in fstab file, I have put entry for combo drive in fstab like this

/dev/cdrom /root/dvdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

Can anyone tell if this is right?
 
Old 07-07-2009, 08:07 AM   #8
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by balaji2219 View Post
I think I am making some mistake in fstab file, I have put entry for combo drive in fstab like this

/dev/cdrom /root/dvdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

Can anyone tell if this is right?
you should change your mount point (only root can access /root)
I suggest:

mkdir -p /mnt/dvdrom

then have this entry in your /etc/fstab

/dev/cdrom /mnt/dvdrom auto users,kudzu,noauto,exec,ro 0 0
 
  


Reply



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
How to copy files after search in array from this directory to another directory! phanvinhgiap Programming 4 01-04-2009 06:48 PM
copy a directory into ... tedtheinsane Linux - Software 7 05-01-2008 11:21 AM
Copy directory execlude directory linux2man Linux - General 3 12-12-2006 07:52 AM
How to copy one directory to another directory thru PHP? green_njk Programming 1 01-06-2006 06:55 AM
copy files from directory to directory without subfile ALInux Linux - General 2 06-03-2005 11:51 AM

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

All times are GMT -5. The time now is 09:18 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