Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
08-03-2008, 01:55 AM
#1
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Rep:
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
08-03-2008, 02:04 AM
#2
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
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
08-03-2008, 02:06 AM
#3
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Original Poster
Rep:
Quote:
Originally Posted by
Mr. C.
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/
08-03-2008, 02:08 AM
#4
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
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.
08-03-2008, 02:15 AM
#5
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Original Poster
Rep:
Quote:
Originally Posted by
Mr. C.
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/
08-03-2008, 02:19 AM
#6
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
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 .
08-03-2008, 02:22 AM
#7
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Original Poster
Rep:
Quote:
Originally Posted by
Mr. C.
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
08-03-2008, 02:26 AM
#8
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
And how are the file systems mounted? Run:
mount
08-03-2008, 02:30 AM
#9
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Original Poster
Rep:
Quote:
Originally Posted by
Mr. C.
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)
08-03-2008, 02:32 AM
#10
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
Ok, now do you have SELinux enabled? If so, disable it and try your copy. You can re-enable later.
08-03-2008, 02:39 AM
#11
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Original Poster
Rep:
Quote:
Originally Posted by
Mr. C.
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.
08-03-2008, 02:56 AM
#13
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Original Poster
Rep:
Quote:
Originally Posted by
Mr. C.
Yes my friend it works, ur genius is there any other way in this community to add u as a friend.
08-03-2008, 03:06 AM
#15
Member
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188
Original Poster
Rep:
Quote:
Originally Posted by
jomen
ohh ur the same guy I really appreciate ur help
All times are GMT -5. The time now is 07:04 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News