Thanks I'll try that and will give you a feedback as soon as possible.<br><br><br><br><div class="gmail_quote">2012/9/26 Anthony Messina <span dir="ltr"><<a href="mailto:amessina@messinet.com" target="_blank">amessina@messinet.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wednesday, September 26, 2012 12:21:14 AM James James wrote:<br>
> I have  :<br>
><br>
> - a freeipa server + autofs maps<br>
> - a nfsv4 server<br>
> - a web server<br>
><br>
> from the webserver I can mount my nfs4 exported home dir. Everything works<br>
> well.<br>
><br>
> I want to acces to my public_html directory from the web server. From my<br>
> browser, when I try to reach <a href="http://myweserver/~user" target="_blank">http://myweserver/~user</a>, I've got 403<br>
> Forbidden and the logs give me :<br>
><br>
> Sep 25 23:18:21 web-server rpc.gssd[4522]: WARNING: Failed to create krb5<br>
> context for user with uid 48 for server <a href="http://nfs-server.example.com" target="_blank">nfs-server.example.com</a> Sep 25<br>
> 23:18:21 web-server rpc.gssd[4522]: doing error downcall<br>
> Sep 25 23:18:21 web-server rpc.gssd[4522]: handling gssd upcall<br>
> (/var/lib/nfs/rpc_pipefs/nfs/clnte2) Sep 25 23:18:21 web-server<br>
> rpc.gssd[4522]: handle_gssd_upcall: 'mech=krb5 uid=48<br>
> enctypes=18,17,16,23,3,1,2 ' Sep 25 23:18:21 web-server rpc.gssd[4522]:<br>
> handling krb5 upcall (/var/lib/nfs/rpc_pipefs/nfs/clnte2) Sep 25 23:18:21<br>
> web-server rpc.gssd[4522]: process_krb5_upcall: service is '<null>' Sep 25<br>
> 23:18:21 web-server rpc.gssd[4522]: getting credentials for client with uid<br>
> 48 for server <a href="http://nfs-server.example.com" target="_blank">nfs-server.example.com</a> Sep 25 23:18:21 web-server<br>
> rpc.gssd[4522]: CC file '/tmp/krb5cc_797200160_Aqx6OL' being considered,<br>
> with preferred realm '<a href="http://EXAMPLE.COM" target="_blank">EXAMPLE.COM</a>' Sep 25 23:18:21 web-server<br>
> rpc.gssd[4522]: CC file '/tmp/krb5cc_797200160_Aqx6OL' owned by 797200160,<br>
> not 48 Sep 25 23:18:21 web-server rpc.gssd[4522]: CC file '/tmp/krb5cc_0'<br>
> being considered, with preferred realm '<a href="http://EXAMPLE.COM" target="_blank">EXAMPLE.COM</a>' Sep 25 23:18:21<br>
> web-server rpc.gssd[4522]: CC file '/tmp/krb5cc_0' owned by 0, not 48 Sep<br>
> 25 23:18:21 web-server rpc.gssd[4522]: WARNING: Failed to create krb5<br>
> context for user with uid 48 for server <a href="http://nfs-server.example.com" target="_blank">nfs-server.example.com</a><br>
><br>
><br>
> Apache user id is 48.<br>
<br>
</div></div>You don't say what system you're using, but for Fedora 16 and 17 (with<br>
systemd), you can use something like the following in<br>
/etc/systemd/system/httpd.service:<br>
<br>
.include /usr/lib/systemd/system/httpd.service<br>
[Unit]<br>
Requires=network.target<br>
After=network.target<br>
<br>
[Service]<br>
Environment=KRB5_KTNAME=/etc/httpd/conf/apache.keytab<br>
Environment=KRB5CCNAME=/tmp/krb5cc_48<br>
ExecStartPre=/usr/bin/kinit -r 604800s -k -t ${KRB5_KTNAME} apache ;<br>
/usr/bin/chown apache:apache ${KRB5CCNAME} ; /usr/bin/chcon -t user_tmp_t<br>
${KRB5CCNAME}<br>
PrivateTmp=false<br>
<br>
<br>
<br>
And you'll need to add a cron job similar to:<br>
5 */8 * * *     apache          /usr/bin/kinit -R ; chcon -t user_tmp_t<br>
/tmp/krb5cc_48<br>
<br>
<br>
Of course, this may all change when Fedora 18 comes out with it's shiny new<br>
way of handling credentials.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Anthony - <a href="http://messinet.com" target="_blank">http://messinet.com</a> - <a href="http://messinet.com/~amessina/gallery
8F89" target="_blank">http://messinet.com/~amessina/gallery<br>
8F89</a> 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E<br>
</font></span><br>_______________________________________________<br>
Freeipa-users mailing list<br>
<a href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br></blockquote></div><br>