Bug 835325 - Kickstartable Distributions does not accept treepath that is from sshfs
Kickstartable Distributions does not accept treepath that is from sshfs
Status: CLOSED NOTABUG
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
1.7
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
:
Depends On:
Blocks: space18
  Show dependency treegraph
 
Reported: 2012-06-25 21:57 EDT by Mohammed Arafa
Modified: 2012-11-01 12:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-28 07:56:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mohammed Arafa 2012-06-25 21:57:18 EDT
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 10:09:40 EDT
I assume the problem is SELinux related. What AVC denials do you get in audit.log?
Comment 2 Jan Pazdziora 2012-06-28 01:59:23 EDT
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 06:16:09 EDT
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@192.168.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 06:18:27 EDT
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 06:19:59 EDT
command used to mount:
sshfs marafa@192.168.122.1:/mnt/iso /media/
Comment 6 Jan Pazdziora 2012-06-28 07:37:26 EDT
What does

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

output?
Comment 7 Mohammed Arafa 2012-06-28 07:47:58 EDT
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 07:53:17 EDT
[root@spacewalk log]# runuser --shell /bin/bash tomcat 'sshfs marafa@192.168.122.1:/mnt/iso /media'
bash: sshfs marafa@192.168.122.1:/mnt/iso /media: No such file or directory
[root@spacewalk log]# runuser --shell /bin/bash tomcat `sshfs marafa@192.168.122.1:/mnt/iso /media`
marafa@192.168.122.1's password: 
bash-4.1$ mount | grep media
marafa@192.168.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 07:56:06 EDT
(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.