System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

 
SOLVED
Go to solution
Qcheck
Super Advisor

rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

I trying to add the rhel5.4 distribution from dvd to ks_mirror but it is erroring out, any ideas please suggest me. Please find the following error from the listed command:

[root@kickstart-togo ks_mirror]# cobbler import --path=/mnt/dvd --name=rhel5.4 --arch=x86_64
task started: 2010-10-05_001753_import
task started (id=Media import, time=Tue Oct 5 00:17:53 2010)
running: rsync -a '/mnt/dvd/' /var/www/cobbler/ks_mirror/rhel5.4-x86_64 --exclude-from=/etc/cobbler/rsync.exclude --progress
building file list ...
rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)
0 files to consider
rsync: cannot stat destination "/var/www/cobbler/ks_mirror/rhel5.4-x86_64": Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(493) [receiver=2.6.8]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(463) [sender=2.6.8]
returned: 12
Exception occured: cobbler.cexceptions.CX
Exception value: 'Command failed'
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 123, in die
raise CX(msg)

Exception occured: cobbler.cexceptions.CX
Exception value: 'Command failed'
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 95, in run
rc = self._run(self)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 224, in runner
self.logger
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 658, in import_tree
return importer.run()
File "/usr/lib/python2.4/site-packages/cobbler/action_import.py", line 181, in run
self.run_this(rsync_cmd, (spacer, self.mirror, self.settings.webdir, self.mirror_name))
File "/usr/lib/python2.4/site-packages/cobbler/action_import.py", line 262, in run_this
utils.die(self.logger,"Command failed")
File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 131, in die
raise CX(msg)

!!! TASK FAILED !!!
[root@kickstart-togo ks_mirror]#
7 REPLIES
Qcheck
Super Advisor

Re: rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

Any ideas????? please lmk....Thank you
Matti_Kurkela
Honored Contributor
Solution

Re: rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

Your Cobbler process doesn't seem to have the permission to access /mnt/dvd/.

Please show the output of all these commands:

ls -ld / /mnt /mnt/dvd
mount | grep '^/mnt/dvd'

If /mnt/dvd is NFS mounted from a remote host, please show the appropriate line of the /etc/exports (or equivalent config file) of that remote host too.

Do you have SELinux enabled in enforcing mode? If you do, then check the logs to see if it has rejected your access attempt: cobbler may be treated by SELinux as a web service component, and thus the SELinux policy might stop it from accessing any removable media by default.

MK
MK
Qcheck
Super Advisor

Re: rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

MK, Thank you for the response and I will check when I am back to work, as I am out of town. Thank you again and I really appreciate.
Qcheck
Super Advisor

Re: rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

MK,

DVD is mounted locally. I am configuring on the laptop. And SELINUX is set to as enforcing.

SELINUX=enforcing

The following are the details you asked:
[root@kickstart-togo ~]# ls -ld /mnt/dvd
drwxrwxrwx 2 root root 4096 Oct 4 21:21 /mnt/dvd
[root@kickstart-togo ~]# mount | grep '^/mnt/dvd'
[root@kickstart-togo ~]# cd /etc/selinux
[root@kickstart-togo selinux]# cat config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
SETLOCALDEFS=0
[root@kickstart-togo selinux]#

Thank you.
Qcheck
Super Advisor

Re: rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

MK,

Sorry, These are the output you asked me:
[root@kickstart-togo ks_mirror]# ls -ld / /mnt /mnt/dvd
drwxr-xr-x 26 root root 4096 Oct 7 20:41 /
drwxrwxrwx 4 root root 4096 Oct 4 21:54 /mnt
dr-xr-xr-x 8 root root 10240 Aug 19 2009 /mnt/dvd
[root@kickstart-togo ks_mirror]# mount | grep '^/mnt/dvd'
[root@kickstart-togo ks_mirror]#

And SELINUX is set to enforcing. Please let me know. Thank you.
Qcheck
Super Advisor

Re: rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

MK,

Do you think this the problem?

[root@kickstart-togo dev]# ls -ld dvd
lrwxrwxrwx 1 root root 4 Oct 7 20:40 dvd -> scd0
[root@kickstart-togo dev]#

In the /dev directory dvd is linked to scd0.
Qcheck
Super Advisor

Re: rsync: link_stat "/mnt/dvd/." failed: Permission denied (13)

never mind, the SELINUX should be set to permissive instead of enforcing. Sorry abt that, overlooked. Thank you again MK, for your kind time and help.