Re: selinux versus chcon

2011-09-20 Thread Stephen Smalley
On Mon, 2011-09-19 at 16:01 -0400, Fulko Hew wrote: > On Mon, Sep 19, 2011 at 3:32 PM, Eric Paris wrote: > > On Mon, 2011-09-19 at 14:49 -0400, Fulko Hew wrote: > > > >> If so... why use chcon versus the semanage/restorecon technique? > >> or if my assesement is wrong... can someone point me to a

Re: selinux versus chcon

2011-09-20 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/19/2011 04:01 PM, Fulko Hew wrote: > On Mon, Sep 19, 2011 at 3:32 PM, Eric Paris > wrote: >> On Mon, 2011-09-19 at 14:49 -0400, Fulko Hew wrote: >> >>> If so... why use chcon versus the semanage/restorecon >>> technique? or if my assesement is

Re: selinux versus chcon

2011-09-20 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/19/2011 04:01 PM, Fulko Hew wrote: > On Mon, Sep 19, 2011 at 3:32 PM, Eric Paris > wrote: >> On Mon, 2011-09-19 at 14:49 -0400, Fulko Hew wrote: >> >>> If so... why use chcon versus the semanage/restorecon >>> technique? or if my assesement is

Re: selinux versus chcon

2011-09-19 Thread Fulko Hew
On Mon, Sep 19, 2011 at 4:38 PM, Ken Dreyer wrote: > On Mon, Sep 19, 2011 at 12:49 PM, Fulko Hew wrote: >> %{_bindir}/chcon -t httpd_sys_script_exec_t >> /var/www/html/nia/scripts/* 2>/dev/null >> semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nia/tmp' >> 2>/dev/null >> restorecon

Re: selinux versus chcon

2011-09-19 Thread Ken Dreyer
On Mon, Sep 19, 2011 at 12:49 PM, Fulko Hew wrote: > %{_bindir}/chcon -t httpd_sys_script_exec_t > /var/www/html/nia/scripts/* 2>/dev/null > semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nia/tmp' > 2>/dev/null > restorecon -v '/var/www/html/nia/tmp' 2>/dev/null As an aside, it is

Re: selinux versus chcon

2011-09-19 Thread Fulko Hew
On Mon, Sep 19, 2011 at 3:32 PM, Eric Paris wrote: > On Mon, 2011-09-19 at 14:49 -0400, Fulko Hew wrote: > >> If so... why use chcon versus the semanage/restorecon technique? >> or if my assesement is wrong... can someone point me to a better >> explanation/tutorial? ... snip ... > So semanage+r

Re: selinux versus chcon

2011-09-19 Thread Eric Paris
On Mon, 2011-09-19 at 14:49 -0400, Fulko Hew wrote: > If so... why use chcon versus the semanage/restorecon technique? > or if my assesement is wrong... can someone point me to a better > explanation/tutorial? chcon is almost never the right way to go. It changes the file on the FS, but it is li

Re: selinux versus chcon

2011-09-19 Thread devzero2000
Sorry for the top posting. No, chcon is not necessary in your example. Perhaps the advice message is wrong, or it is something historical. Hth 2011/9/19, Fulko Hew : > I've reviewing my buildRPM spec file so that it works in newer distributions > (currently playing with RHEL 5.6), but my question

selinux versus chcon

2011-09-19 Thread Fulko Hew
I've reviewing my buildRPM spec file so that it works in newer distributions (currently playing with RHEL 5.6), but my question is applicable to Fedora xxx as well. During the development of my package, I had encountered issues with my build and install procedures during the slow migration/accepta