Bug 835325 - Kickstartable Distributions does not accept treepath that is from sshfs
Summary: Kickstartable Distributions does not accept treepath that is from sshfs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.7
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space18
TreeView+ depends on / blocked
 
Reported: 2012-06-26 01:57 UTC by Mohammed Arafa
Modified: 2012-11-01 16:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-28 11:56:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Mohammed Arafa 2012-06-26 01:57:18 UTC
Description of problem:
i had an iso of centos 6.2 on a remote box. i mounted it via -o loop
then on the spacewalk server i used sshfs to mount it locally so that i may create the kickstartable distribution. no luck.

it only worked when i mounted the iso locally -o loop on the spacewalk server.

i am assuming this is also for nfs, altho untried

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jan Pazdziora 2012-06-27 14:09:40 UTC
I assume the problem is SELinux related. What AVC denials do you get in audit.log?

Comment 2 Jan Pazdziora 2012-06-28 05:59:23 UTC
Also, please specify exactly what "no luck" means -- if it's internal server error on .do page, show us traceback from /var/log/tomcat*/catalina.out.

Comment 3 Mohammed Arafa 2012-06-28 10:16:09 UTC
hello

re: selinux
root@spacewalk ~]# getenforce 
Disabled

re: the error:
The initrd could not be found at the specified location: /media/images/pxeboot/initrd.img

[root@spacewalk ~]# mount | grep media
marafa.122.1:/mnt/iso on /media type fuse.sshfs (rw,nosuid,nodev)

[root@spacewalk ~]# ls -ld /media/
drwxr-xr-x 1 root root 4.0K Dec 15  2011 /media/

last line in catalina.out 
2012-06-28 04:13:50,511 [TP-Processor6] WARN  com.redhat.rhn.frontend.action.channel.PackageSearchHelper - Performing pkg search: libpng-static, search_name
2012-06-28 04:13:50,928 [TP-Processor6] WARN  com.redhat.rhn.frontend.action.channel.PackageSearchHelper - Performing pkg search: mod_nss, search_name
[root@spacewalk ~]# date
Thu Jun 28 06:14:59 EDT 2012

Comment 4 Mohammed Arafa 2012-06-28 10:18:27 UTC
contents of the location mentioned above:
[root@spacewalk log]# ll /media/images/pxeboot/initrd.img
-rw-r--r-- 1 root root 30M Dec 10  2011 /media/images/pxeboot/initrd.img

Comment 5 Mohammed Arafa 2012-06-28 10:19:59 UTC
command used to mount:
sshfs marafa.122.1:/mnt/iso /media/

Comment 6 Jan Pazdziora 2012-06-28 11:37:26 UTC
What does

# runuser --shell /bin/bash tomcat 'ls -la /media/images/pxeboot/initrd.img'

output?

Comment 7 Mohammed Arafa 2012-06-28 11:47:58 UTC
root@spacewalk log]# runuser --shell /bin/bash tomcat 'ls -la /media/images/pxeboot/initrd.img'
bash: ls -la /media/images/pxeboot/initrd.img: No such file or directory
[root@spacewalk log]# ls -la /media/images/pxeboot/initrd.img
-rw-r--r-- 1 root root 30M Dec 10  2011 /media/images/pxeboot/initrd.img

Comment 8 Mohammed Arafa 2012-06-28 11:53:17 UTC
[root@spacewalk log]# runuser --shell /bin/bash tomcat 'sshfs marafa.122.1:/mnt/iso /media'
bash: sshfs marafa.122.1:/mnt/iso /media: No such file or directory
[root@spacewalk log]# runuser --shell /bin/bash tomcat `sshfs marafa.122.1:/mnt/iso /media`
marafa.122.1's password: 
bash-4.1$ mount | grep media
marafa.122.1:/mnt/iso on /media type fuse.sshfs (rw,nosuid,nodev)
bash-4.1$ ls -la /media/images/pxeboot/initrd.img
ls: cannot access /media/images/pxeboot/initrd.img: Permission denied
bash-4.1$ cd /media 
bash: cd: /media: Permission denied
bash-4.1$ cd /
bash-4.1$ ls -ltr
ls: cannot access media: Permission denied
total 102
d??????????   ? ?    ?        ?            ? media
drwxr-xr-x.   2 root root  4096 Sep 23  2011 srv

Comment 9 Jan Pazdziora 2012-06-28 11:56:06 UTC
(In reply to comment #7)
> root@spacewalk log]# runuser --shell /bin/bash tomcat 'ls -la
> /media/images/pxeboot/initrd.img'
> bash: ls -la /media/images/pxeboot/initrd.img: No such file or directory
> [root@spacewalk log]# ls -la /media/images/pxeboot/initrd.img
> -rw-r--r-- 1 root root 30M Dec 10  2011 /media/images/pxeboot/initrd.img

This means that whatever is in the chain of technologies that make that content available on your Spacewalk server is only making it available to the root user, not to the tomcat user. So it's a general access permission issue, not anything specific to Spacewalk.

Closing as NOTABUG.


Note You need to log in before you can comment on or make changes to this bug.