LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-01-2008, 04:25 AM   #1
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Rep: Reputation: 32
Unhappy cp permission deny


Hello,

I am using Centso5.2 it is my 1st time using Centos, I am getting problem copying DVD to /pub directory when I type #cp -av * /var/ftp/pub It show permission deny How to solve this problem.




[root@rahil CentOS_5.2_Final]# cp -av * /var/ftp/pub/
cp: cannot create directory `/var/ftp/pub/CentOS': Permission denied
`EULA' -> `/var/ftp/pub/EULA'
cp: cannot create regular file `/var/ftp/pub/EULA': Permission denied
`GPL' -> `/var/ftp/pub/GPL'
cp: cannot create regular file `/var/ftp/pub/GPL': Permission denied
cp: cannot create directory `/var/ftp/pub/images': Permission denied
cp: cannot create directory `/var/ftp/pub/isolinux': Permission denied
cp: cannot create directory `/var/ftp/pub/NOTES': Permission denied
`RELEASE-NOTES-cs' -> `/var/ftp/pub/RELEASE-NOTES-cs'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-cs': Permission denied
`RELEASE-NOTES-cs.html' -> `/var/ftp/pub/RELEASE-NOTES-cs.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-cs.html': Permission denied
`RELEASE-NOTES-de' -> `/var/ftp/pub/RELEASE-NOTES-de'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-de': Permission denied
`RELEASE-NOTES-de.html' -> `/var/ftp/pub/RELEASE-NOTES-de.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-de.html': Permission denied
`RELEASE-NOTES-en' -> `/var/ftp/pub/RELEASE-NOTES-en'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-en': Permission denied
`RELEASE-NOTES-en.html' -> `/var/ftp/pub/RELEASE-NOTES-en.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-en.html': Permission denied
`RELEASE-NOTES-en_US' -> `/var/ftp/pub/RELEASE-NOTES-en_US'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-en_US': Permission denied
`RELEASE-NOTES-en_US.html' -> `/var/ftp/pub/RELEASE-NOTES-en_US.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-en_US.html': Permission denied
`RELEASE-NOTES-es' -> `/var/ftp/pub/RELEASE-NOTES-es'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-es': Permission denied
`RELEASE-NOTES-es.html' -> `/var/ftp/pub/RELEASE-NOTES-es.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-es.html': Permission denied
`RELEASE-NOTES-fr' -> `/var/ftp/pub/RELEASE-NOTES-fr'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-fr': Permission denied
`RELEASE-NOTES-fr.html' -> `/var/ftp/pub/RELEASE-NOTES-fr.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-fr.html': Permission denied
`RELEASE-NOTES-ja' -> `/var/ftp/pub/RELEASE-NOTES-ja'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-ja': Permission denied
`RELEASE-NOTES-ja.html' -> `/var/ftp/pub/RELEASE-NOTES-ja.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-ja.html': Permission denied
`RELEASE-NOTES-nl' -> `/var/ftp/pub/RELEASE-NOTES-nl'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-nl': Permission denied
`RELEASE-NOTES-nl.html' -> `/var/ftp/pub/RELEASE-NOTES-nl.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-nl.html': Permission denied
`RELEASE-NOTES-pt_BR' -> `/var/ftp/pub/RELEASE-NOTES-pt_BR'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-pt_BR': Permission denied
`RELEASE-NOTES-pt_BR.html' -> `/var/ftp/pub/RELEASE-NOTES-pt_BR.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-pt_BR.html': Permission denied
`RELEASE-NOTES-ro' -> `/var/ftp/pub/RELEASE-NOTES-ro'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-ro': Permission denied
`RELEASE-NOTES-ro.html' -> `/var/ftp/pub/RELEASE-NOTES-ro.html'
cp: cannot create regular file `/var/ftp/pub/RELEASE-NOTES-ro.html': Permission denied
cp: cannot create directory `/var/ftp/pub/repodata': Permission denied
`RPM-GPG-KEY-beta' -> `/var/ftp/pub/RPM-GPG-KEY-beta'
cp: cannot create regular file `/var/ftp/pub/RPM-GPG-KEY-beta': Permission denied
`RPM-GPG-KEY-CentOS-5' -> `/var/ftp/pub/RPM-GPG-KEY-CentOS-5'
cp: cannot create regular file `/var/ftp/pub/RPM-GPG-KEY-CentOS-5': Permission denied
`TRANS.TBL' -> `/var/ftp/pub/TRANS.TBL'
cp: cannot create regular file `/var/ftp/pub/TRANS.TBL': Permission denied



please help me guyz.
 
Old 08-01-2008, 04:30 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Check the permissions on the directory and how the partition is mounted. Since you are doing this as root, check your selinux settings. It may be protecting that directory.
 
Old 08-01-2008, 11:51 PM   #3
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
I allowed /pub directory from selinux but still same problem
 
Old 08-02-2008, 01:22 AM   #4
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
What if you used your ftp-server to upload the files to it instead of copying the files directly? Does this not work?
 
Old 08-02-2008, 04:05 AM   #5
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
I am sorry I didn't get it what you say
 
Old 08-02-2008, 04:28 AM   #6
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
I asked this because it seems to me that you want to put some files into a directory (/var/ftp/pub) which appears to be the "pub" directory of an ftp-server.
Are you running an ftp-server and want the files copied to that directory in order to make them accessible through ftp?
Ftp-servers are used to upload and download files.
If the ftp-server is working you should be able to upload the files to it using a ftp-client (like FileZilla or gftp) - especially when you are the admin of that server.
 
Old 08-02-2008, 05:11 AM   #7
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by jomen View Post
I asked this because it seems to me that you want to put some files into a directory (/var/ftp/pub) which appears to be the "pub" directory of an ftp-server.
Are you running an ftp-server and want the files copied to that directory in order to make them accessible through ftp?
Ftp-servers are used to upload and download files.
If the ftp-server is working you should be able to upload the files to it using a ftp-client (like FileZilla or gftp) - especially when you are the admin of that server.
Yes, my ftp server is working problem and I have restarted vsftpd also, but problem is when I mount CD and try to copy CD to /var/ftp/pub/ for yum server I face permission failed problem, please check my 1st Thread Error.
 
Old 08-02-2008, 05:21 AM   #8
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
...but you did not (try to...) copy it using an ftp-client - you want to copy it via "cp"

(which _should_ _still_ work of course - I was suggesting working around that problem you have with "cp")
 
Old 08-02-2008, 06:29 AM   #9
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by jomen View Post
...but you did not (try to...) copy it using an ftp-client - you want to copy it via "cp"

(which _should_ _still_ work of course - I was suggesting working around that problem you have with "cp")
yes... I am trying to copy by cp -av * /var/ftp/pub/ but I get same problem .

u r saying me to try from ftp-client, How can I do with ftp--client, I am try to copy from same Server where I want to make my yum server, then which I get is from Cd drive only, by default when i try from /root partition to /home partition there is no problem to copy any file, please let me y I get problem with Cd rom
 
Old 08-03-2008, 03:01 AM   #10
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Quote:
How can I do with ftp--client,
- start your preferred ftp-client
- connect to the server
- transfer the files just like would do where you not on the same machine but anywhere on the net

But I just saw that this one is actually a double post and someone else was trying to help on that issue from another perspective.
http://www.linuxquestions.org/questi...roblem-660050/
and it got kind of solved - so I will stop trying here.
 
Old 08-03-2008, 03:08 AM   #11
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Duplicate thread. Resolved here:

http://www.linuxquestions.org/questi...0/#post3234931

Please post any additional comments in the above thread.
 
  


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
group permission the sticky bit permission comes in capital 'S' pkishorenayak Linux - Newbie 1 04-11-2008 05:04 PM
strange permission deny da lord Linux - Server 2 02-07-2008 03:14 AM
deny rm permission for non-owner of files AndrewBS42 Linux - Security 3 10-03-2007 01:53 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 05:57 AM
never_direct deny all vs. always_direct deny all simplyrahul Linux - General 1 02-16-2005 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:08 AM.

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