LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


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

Rep: Reputation: 32
Copy problem


Hello,

I am using CentOS, I am trying to copy my DVD to /pub directory its says permission deny, here is the error shows the problem

[root@rahil cd]# 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
[root@rahil cd]# restorecon -R /var/ftp/pub/
[root@rahil cd]# 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
[root@rahil cd]# uname -a
Linux rahil 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686 i386 GNU/Linux



please check this error I dont know how to solve this problem
 
Old 08-03-2008, 02:04 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
What user/group are you running the command as?

What is the output of:

ls -ld /var/ftp/pub/* /var/ftp/pub/ /var/ftp /var
 
Old 08-03-2008, 02:06 AM   #3
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Mr. C. View Post
What user/group are you running the command as?

What is the output of:

ls -ld /var/ftp/pub/* /var/ftp/pub/ /var/ftp /var
I have login as root, my output of var/ftp/pub/ is blow

[root@rahil /]# ls -ld /var/ftp/pub/
drwxr-xr-x 2 root root 4096 May 24 21:35 /var/ftp/pub/
 
Old 08-03-2008, 02:08 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
I can't help if you can't follow directions. Look at your command, and look at the command I requested you to run. Run exactly the command I gave.
 
Old 08-03-2008, 02:15 AM   #5
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Mr. C. View Post
I can't help if you can't follow directions. Look at your command, and look at the command I requested you to run. Run exactly the command I gave.
IM SORRY FOR THE LAST POST, here is the command below

[root@rahil ~]# ls -ld /var/ftp/pub/* /var/ftp/pub/ /var/ftp /var
ls: /var/ftp/pub/*: No such file or directory
drwxr-xr-x 24 root root 4096 Aug 3 11:59 /var
drwxr-xr-x 3 root root 4096 Aug 3 11:53 /var/ftp
drwxr-xr-x 2 root root 4096 May 24 21:35 /var/ftp/pub/
 
Old 08-03-2008, 02:19 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Ok, good. So standard directory permissions are fine.

This leaves ACLs, SELinux, or file system mounting ro vs. rw. Let's first look at ACLs and file system read/write mounting:

lsattr /var/ftp/pub/ /var/ftp /var
mount

Last edited by Mr. C.; 08-03-2008 at 02:20 AM.
 
Old 08-03-2008, 02:22 AM   #7
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Mr. C. View Post
Ok, good. So standard directory permissions are fine.

This leaves ACLs, SELinux, or file system mounting ro vs. rw. Let's first look at ACLs and file system read/write mounting:

lsattr /var/ftp/pub/ /var/ftp /var
mount
I have not done anything with ACL, I see the command below

[root@rahil ~]# lsattr /var/ftp/pub/ /var/ftp /var
------------- /var/ftp/pub
------------- /var/db
------------- /var/nis
------------- /var/racoon
------------- /var/opt
------------- /var/lock
------------- /var/preserve
------------- /var/cvs
------------- /var/empty
------------- /var/run
------------- /var/cache
------------- /var/mail
------------- /var/yp
------------- /var/gdm
------------- /var/spool
------------- /var/ftp
------------- /var/lost+found
------------- /var/lib
------------- /var/www
------------- /var/account
------------- /var/tmp
------------- /var/local
------------- /var/games
------------- /var/log
 
Old 08-03-2008, 02:26 AM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
And how are the file systems mounted? Run:

mount
 
Old 08-03-2008, 02:30 AM   #9
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Mr. C. View Post
And how are the file systems mounted? Run:

mount
[root@rahil ~]# mount
/dev/hdc3 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hdc6 on /var type ext3 (rw)
/dev/hdc5 on /usr type ext3 (rw)
/dev/hdc2 on /home type ext3 (rw)
/dev/hdc1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hda on /media/CentOS_5.2_Final type iso9660 (ro,noexec,nosuid,nodev,uid=0)
 
Old 08-03-2008, 02:32 AM   #10
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Ok, now do you have SELinux enabled? If so, disable it and try your copy. You can re-enable later.
 
Old 08-03-2008, 02:39 AM   #11
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Mr. C. View Post
Ok, now do you have SELinux enabled? If so, disable it and try your copy. You can re-enable later.
C let me tell you a problem I am not able to copy from CLI, but when I go to GUI mode and go to Cdrom and select all file from CD then copy to /pub its done I dont know y I get problem with CLI, for this I tried so much I havent got any sucess.
 
Old 08-03-2008, 02:43 AM   #12
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
I understand. But do we know if you have SELinux enabled? Do you know how to temporarily disable it ?

http://www.crypt.gen.nz/selinux/disa...inux.html#DIS2
 
Old 08-03-2008, 02:56 AM   #13
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Mr. C. View Post
I understand. But do we know if you have SELinux enabled? Do you know how to temporarily disable it ?

http://www.crypt.gen.nz/selinux/disa...inux.html#DIS2
Yes my friend it works, ur genius is there any other way in this community to add u as a friend.
 
Old 08-03-2008, 03:03 AM   #14
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
So you just abandoned this:
http://www.linuxquestions.org/questi...n-deny-659694/
and tried your luck here without any note?
Good luck then.
 
Old 08-03-2008, 03:06 AM   #15
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by jomen View Post
So you just abandoned this:
http://www.linuxquestions.org/questi...n-deny-659694/
and tried your luck here without any note?
Good luck then.
ohh ur the same guy I really appreciate ur help
 
  


Closed Thread



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
Copy Problem. rvijay Linux - Newbie 10 09-24-2006 12:35 PM
Copy(cp) problem shipon_97 Linux - General 2 02-28-2006 02:19 AM
copy problem suguname Mandriva 2 01-28-2005 12:54 AM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 12:40 PM
copy problem feind Linux - Networking 11 04-06-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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