Jump to content

Odpowiednik Krasnala


efect1
 Share

Recommended Posts

ok już zrobiłem :)

musiałem php admina doinstalować

i teraz głupie pytanko czy za każdym razem musze wpisywać w konsoli jako root /etc/init.d/httpd start itp czy przy starcie systemu mogę to jakioś automatycznie zrobic ?

 

Jasne, że możesz. Jest taki program konsolowy ntsysv (też odpalaj z roota). Tam zaznaczasz co chcesz mieć odpalane na starcie. Są też odpowiednie programy pod Gnome i KDE. Nie pamiętam ich nazw w tym momencie.

Link to comment
Share on other sites

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

kurcze znowu głupi error tzn seLinux blokuje mi wyświetlanie stronki na localhost

( jak coś wrzucę to selinux sie uruchamia i w trayu wyskakuje komunikat odmowa dostępu :( )

----------------------------------------------

w zaporze sieciowej dodałem

- bezpieczne www

- www(http)

Komunikat nie wyskauje ale nadal jest tylo strona testowa

http://bp1.blogger.com/_9AexwIcHDMM/R4uJJf...utekranu-39.png

wrzucam do katalogu html pliki ale sie nie wyświetlają ?

Pisze że serwer nie moż znaleźć dokumentu

(Not Found

 

The requested URL /index.html was not found on this server.)

Co jest nie tak ?

Link to comment
Share on other sites

( jak coś wrzucę to selinux sie uruchamia i w trayu wyskakuje komunikat odmowa dostępu :( )
Zazwyczaj "setroubleshootd" (to od niego ten komunikat w trayu zapewne, taka gwiazdka) pokazuje bardzo dokładne objaśnienie co trzeba wykonać, żeby było OK. Wklej tutaj pełną treść tego komunikatu.

 

A obrazków to już mniejszych nie mogłeś wrzucić? :lol: To co się wyświetla jest wielkości znaczka pocztowego :)

Link to comment
Share on other sites

odmowa acv nacisnij ikone aby sie dowiedziec to ten komunikat

tu masz obrazek w lepszym formacie

http://bp1.blogger.com/_9AexwIcHDMM/R4uJJf...utekranu-39.png

jak klikam na tą ikonkę ( gwiazdkę )

to wyświetla mi sie okno setroubleshootd

Podrzucam alert setroubleshootd ( może się przyda :) )

Podsumowanie:

SELinux is preventing the httpd from using potentially mislabeled files
(/var/www/html/index.php).

SzczegĂłĹ?owy opis:

SELinux has denied httpd access to potentially mislabeled file(s)
(/var/www/html/index.php). This means that SELinux will not allow httpd to use
these files. It is common for users to edit files in their home directory or tmp
directories and then move (mv) them to system directories. The problem is that
the files end up with the wrong file context which confined applications are not
allowed to access.

Zezwalanie na dostÄ?p:

If you want httpd to access this files, you need to relabel them using
restorecon -v '/var/www/html/index.php'. You might want to relabel the entire
directory using restorecon -R -v '/var/www/html'.

Dodatkowe informacje:

Kontekst ĹşrĂłdĹ?owy          unconfined_u:system_r:httpd_t:s0
Kontekst docelowy             unconfined_u:object_r:user_home_t:s0
Obiekty docelowe              /var/www/html/index.php [ file ]
ĹšrĂłdĹ?o                     httpd
Ĺ?cieĹźka ĹşrĂłdĹ?owa         /usr/sbin/httpd
Port                          <Nieznane>
Komputer                      localhost.localdomain
ĹšrĂłdĹ?owe pakiety RPM       httpd-2.2.8-3
Docelowe pakiety RPM          
RPM polityki                  selinux-policy-3.3.1-64.fc9
SELinux jest wĹ?Ä?czony       True
Typ polityki                  targeted
MLS jest wĹ?Ä?czone           True
Tryb wymuszania               Enforcing
Nazwa wtyczki                 home_tmp_bad_labels
Nazwa komputera               localhost.localdomain
Platforma                     Linux localhost.localdomain 2.6.25.6-55.fc9.i686
                             #1 SMP Tue Jun 10 16:27:49 EDT 2008 i686 i686
Licznik alarmĂłw              40
Po raz pierwszy               wto, 24 cze 2008, 21:12:35
Po raz ostatni                wto, 24 cze 2008, 22:29:07
Lokalny ID                    fcb10e7d-181c-4f32-8b14-008857e4d7e2
Liczba wierszy                

Surowe komunikaty audytu      

host=localhost.localdomain type=AVC msg=audit(1214339347.349:36): avc:  denied  { getattr } for  pid=2949 comm="httpd" path="/var/www/html/index.php" dev=dm-0 ino=157801 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

host=localhost.localdomain type=SYSCALL msg=audit(1214339347.349:36): arch=40000003 syscall=196 success=no exit=-13 a0=b9d70c40 a1=bfe18dac a2=555ff4 a3=2008171 items=0 ppid=2942 pid=2949 auid=501 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=2 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)




Podsumowanie:

SELinux is preventing polkit-resolve- (polkit_resolve_t) "ptrace" to <Nieznane>
(unconfined_t).

SzczegĂłĹ?owy opis:

SELinux denied access requested by polkit-resolve-. It is not expected that this
access is required by polkit-resolve- and this access may signal an intrusion
attempt. It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Zezwalanie na dostÄ?p:

MoĹźesz utworzyÄ? lokalny moduĹ? polityki, aby pozwoliÄ? na ten dostÄ?p - zobacz
FAQ (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) MoĹźesz teĹź
wyĹ?Ä?czyÄ? ochronÄ? SELinuksa. WyĹ?Ä?czenie jej nie jest zalecane. ZgĹ?oĹ?
raport bĹ?Ä?du (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) o tym
pakiecie.

Dodatkowe informacje:

Kontekst ĹşrĂłdĹ?owy          system_u:system_r:polkit_resolve_t:s0
Kontekst docelowy             unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                             023
Obiekty docelowe              None [ process ]
ĹšrĂłdĹ?o                     polkit-resolve-
Ĺ?cieĹźka ĹşrĂłdĹ?owa         /usr/libexec/polkit-resolve-exe-helper
Port                          <Nieznane>
Komputer                      localhost.localdomain
ĹšrĂłdĹ?owe pakiety RPM       PolicyKit-0.8-2.fc9
Docelowe pakiety RPM          
RPM polityki                  selinux-policy-3.3.1-62.fc9
SELinux jest wĹ?Ä?czony       True
Typ polityki                  targeted
MLS jest wĹ?Ä?czone           True
Tryb wymuszania               Enforcing
Nazwa wtyczki                 catchall
Nazwa komputera               localhost.localdomain
Platforma                     Linux localhost.localdomain 2.6.25.4-30.fc9.i686
                             #1 SMP Wed May 21 18:12:35 EDT 2008 i686 i686
Licznik alarmĂłw              8
Po raz pierwszy               czw, 12 cze 2008, 10:19:47
Po raz ostatni                piÄ?, 13 cze 2008, 21:00:26
Lokalny ID                    4e6c3c05-b5f3-464f-b0c5-666477ea4f52
Liczba wierszy                

Surowe komunikaty audytu      

host=localhost.localdomain type=AVC msg=audit(1213383626.716:13): avc:  denied  { ptrace } for  pid=2586 comm="polkit-resolve-" scontext=system_u:system_r:polkit_resolve_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process

host=localhost.localdomain type=SYSCALL msg=audit(1213383626.716:13): arch=40000003 syscall=85 success=no exit=-13 a0=bfcb8958 a1=bfcb89b4 a2=fff a3=bfcb8958 items=0 ppid=1824 pid=2586 auid=4294967295 uid=0 gid=68 euid=0 suid=0 fsuid=0 egid=68 sgid=68 fsgid=68 tty=(none) ses=4294967295 comm="polkit-resolve-" exe="/usr/libexec/polkit-resolve-exe-helper" subj=system_u:system_r:polkit_resolve_t:s0 key=(null)




Podsumowanie:

SELinux is preventing the httpd from using potentially mislabeled files
(/var/www/html/administrator).

SzczegĂłĹ?owy opis:

SELinux has denied httpd access to potentially mislabeled file(s)
(/var/www/html/administrator). This means that SELinux will not allow httpd to
use these files. It is common for users to edit files in their home directory or
tmp directories and then move (mv) them to system directories. The problem is
that the files end up with the wrong file context which confined applications
are not allowed to access.

Zezwalanie na dostÄ?p:

If you want httpd to access this files, you need to relabel them using
restorecon -v '/var/www/html/administrator'. You might want to relabel the
entire directory using restorecon -R -v '/var/www/html/administrator'.

Dodatkowe informacje:

Kontekst ĹşrĂłdĹ?owy          unconfined_u:system_r:httpd_t:s0
Kontekst docelowy             unconfined_u:object_r:user_home_t:s0
Obiekty docelowe              /var/www/html/administrator [ dir ]
ĹšrĂłdĹ?o                     httpd
Ĺ?cieĹźka ĹşrĂłdĹ?owa         /usr/sbin/httpd
Port                          <Nieznane>
Komputer                      localhost.localdomain
ĹšrĂłdĹ?owe pakiety RPM       httpd-2.2.8-3
Docelowe pakiety RPM          
RPM polityki                  selinux-policy-3.3.1-64.fc9
SELinux jest wĹ?Ä?czony       True
Typ polityki                  targeted
MLS jest wĹ?Ä?czone           True
Tryb wymuszania               Enforcing
Nazwa wtyczki                 home_tmp_bad_labels
Nazwa komputera               localhost.localdomain
Platforma                     Linux localhost.localdomain 2.6.25.6-55.fc9.i686
                             #1 SMP Tue Jun 10 16:27:49 EDT 2008 i686 i686
Licznik alarmĂłw              6
Po raz pierwszy               wto, 24 cze 2008, 21:19:23
Po raz ostatni                wto, 24 cze 2008, 21:36:00
Lokalny ID                    d0920675-e969-47c2-927b-096061302d0f
Liczba wierszy                

Surowe komunikaty audytu      

host=localhost.localdomain type=AVC msg=audit(1214336160.665:60): avc:  denied  { getattr } for  pid=2749 comm="httpd" path="/var/www/html/administrator" dev=dm-0 ino=154355 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir

host=localhost.localdomain type=SYSCALL msg=audit(1214336160.665:60): arch=40000003 syscall=196 success=no exit=-13 a0=b987c370 a1=bfd4546c a2=555ff4 a3=2008171 items=0 ppid=2743 pid=2749 auid=500 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=1 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)




Podsumowanie:

SELinux prevented umount from mounting on the file or directory
"/media/.hal-mtab-lock" (type "mnt_t").

SzczegĂłĹ?owy opis:

SELinux prevented umount from mounting a filesystem on the file or directory
"/media/.hal-mtab-lock" of type "mnt_t". By default SELinux limits the mounting
of filesystems to only some files or directories (those with types that have the
mountpoint attribute). The type "mnt_t" does not have this attribute. You can
either relabel the file or directory or set the boolean "allow_mount_anyfile" to
true to allow mounting on any file or directory.

Zezwalanie na dostÄ?p:

Zmienianie wartoĹ?ci logicznej "allow_mount_anyfile" na prawdÄ? zezwoli na ten
dostÄ?p: "setsebool -P allow_mount_anyfile=1."

Polecenie naprawy:

setsebool -P allow_mount_anyfile=1

Dodatkowe informacje:

Kontekst ĹşrĂłdĹ?owy          system_u:system_r:mount_t:s0
Kontekst docelowy             system_u:object_r:mnt_t:s0
Obiekty docelowe              /media/.hal-mtab-lock [ file ]
ĹšrĂłdĹ?o                     umount
Ĺ?cieĹźka ĹşrĂłdĹ?owa         /bin/umount
Port                          <Nieznane>
Komputer                      localhost.localdomain
ĹšrĂłdĹ?owe pakiety RPM       util-linux-ng-2.13.1-6.fc9
Docelowe pakiety RPM          
RPM polityki                  selinux-policy-3.3.1-55.fc9
SELinux jest wĹ?Ä?czony       True
Typ polityki                  targeted
MLS jest wĹ?Ä?czone           True
Tryb wymuszania               Enforcing
Nazwa wtyczki                 allow_mount_anyfile
Nazwa komputera               localhost.localdomain
Platforma                     Linux localhost.localdomain 2.6.25.4-30.fc9.i686
                             #1 SMP Wed May 21 18:12:35 EDT 2008 i686 i686
Licznik alarmĂłw              2
Po raz pierwszy               nie, 8 cze 2008, 09:34:04
Po raz ostatni                nie, 8 cze 2008, 09:35:37
Lokalny ID                    a7219f69-ebe3-490f-a34a-784121419789
Liczba wierszy                

Surowe komunikaty audytu      

host=localhost.localdomain type=AVC msg=audit(1212910537.607:13): avc:  denied  { read write } for  pid=2768 comm="umount" path="/media/.hal-mtab-lock" dev=dm-0 ino=56923 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:mnt_t:s0 tclass=file

host=localhost.localdomain type=SYSCALL msg=audit(1212910537.607:13): arch=40000003 syscall=11 success=yes exit=0 a0=804b14d a1=bfd2bca0 a2=bfd2c21c a3=804b14d items=0 ppid=2764 pid=2768 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="umount" exe="/bin/umount" subj=system_u:system_r:mount_t:s0 key=(null)

Link to comment
Share on other sites

A nie pisze tam wszystkiego?

 

Jak dla mnie należałoby z roota wykonać polecenie: restorecon -R -v '/var/www/html'

 

oraz

 

setsebool -P allow_mount_anyfile=1

 

A co do zrzutu ekranu to nie rozumie. Jest to najnormalniejsza strona startowa Apache. Znaczy, że działa Ci prawidłowo :-)

Link to comment
Share on other sites

Jak dla mnie należałoby z roota wykonać polecenie: restorecon -R -v '/var/www/html'

 

oraz

 

setsebool -P allow_mount_anyfile=1

To właśnie miałem na myśli pisząc, że "setroubleshootd" pisze dokładnie co należy zrobić :)

 

A obrazek, który wkleiłeś mówi, że coś z konfiguracją nie bardzo. Albo wrzuciłeś pliki nie tam gdzie to wskazuje plik konfiguracji albo w konfigu nie wskazałeś domyślnego pliku startowego (index.php, index.html) - nie znam się na tym za bardzo, więc tu mogę się mylić, ale o konfiguracji apacha to na naszym forum było juz wiele razy, więc wystarczy poszukać.

Link to comment
Share on other sites

te polecenia co wy podajecie nie działają :(

Szukałem na forum

znalazłem różnego typu problemy nawiązujące po części do mojego

http://forum.fedora.pl/index.php?showtopic...0&hl=apache

zrobiłem tak jak ten koleś każe i nic ( bo problem mam chyba podobny

zmieniłem DirectoryIndex index.html index.html.var

na DirectoryIndex index.php index.php.var

i nic dodałem

<Directory />

Options FollowSymLinks

AllowOverride None

</Directory>

 

końcówkę indexes

 

<Directory />

Options FollowSymLinks Indexes

AllowOverride None

</Directory>

i nic

Co jest przyczyną ?

Link to comment
Share on other sites

A obrazek, który wkleiłeś mówi, że coś z konfiguracją nie bardzo. Albo wrzuciłeś pliki nie tam gdzie to wskazuje plik konfiguracji albo w konfigu nie wskazałeś domyślnego pliku startowego (index.php, index.html) - nie znam się na tym za bardzo, więc tu mogę się mylić, ale o konfiguracji apacha to na naszym forum było juz wiele razy, więc wystarczy poszukać.

 

Z konfiguracją to jest tak domyślnie w Fedora 9. I jest to domyślna strona Apache zaraz po instalacji i uruchomieniu. Jeśli chcemy, aby Apache czytał nam z katalogu /var/www/html to jak jak w opisie na tej stronie edytujemy z roota plik /etc/httpd/conf.d/welcome.conf i komentujemy tam te 4 linijki:

 

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

 

I restartujemy z roota Apache'a.

Link to comment
Share on other sites

Na xp używałem krasnala czy istnieje jakiś odpowiednik , najlepiej aby był to jeden program tak jak krasnal i oferował wszystkie potrzebne funckej php , mysql itp.

 

Jest XAMPP. Ale w/g mnie i pewnie innych osób tutaj wszystko co potrzebne masz w repozytoriach, albo już zainstalowane na partycji z Fedorą. Być może będzie potrzeba tu i tam dokonać małych zmian w konfiguracji. Nikt ci nie gwarantuje, że w XAMPP-ie nie będziesz musiał też dokonać pewnych zmian w konfiguracji.

Link to comment
Share on other sites

zmieniłem DirectoryIndex index.html index.html.var

na DirectoryIndex index.php index.php.var

 

I pozbawiłeś się w ten sposób wyświetlania plików indeksowych z rozszerzeniem html :-) Zostaw tak jak było. No może dodaj jedynie jeszcze pliki z rozszerzeniem htm

DirectoryIndex index.html index.html.var index.htm

 

O czywiście zmian dokonaj z roota w pliku /etc/httpd/conf/httpd.conf

 

Co do php to obsługa tego mechanizmu jest dołącząna z pliku /etc/httpd/conf.d/php.conf. Jak sobie podglądniesz ten plik zauważysz tam kolejną dyrektywę dodającą obsługę plików indeksowych z rozszerzeniem php:

DirectoryIndex index.php

 

Na koniec oczywiście restart Apache z roota /etc/init.d/httpd restart :-)

Link to comment
Share on other sites

piena nie rozumiem za bardzo tego

Z konfiguracją to jest tak domyślnie w Fedora 9. I jest to domyślna strona Apache zaraz po instalacji i uruchomieniu. Jeśli chcemy, aby Apache czytał nam z katalogu /var/www/html to jak jak w opisie na tej stronie edytujemy z roota plik /etc/httpd/conf.d/welcome.conf i komentujemy tam te 4 linijki:

Kod
<LocationMatch "^/+$">
   Options -Indexes
   ErrorDocument 403 /error/noindex.html
</LocationMatch>

komentujemy tam te 4 linijki: ? o co chodzi ?

P.S

Tak sobie grzebie w tych plikach konfiguracyjnych itp.

I dochodzę do wniosku , żę setroubleshoot blokuje dostęp jak można by zrobić aby ignorował to ?

 

Link to comment
Share on other sites

setroubleshoot wygląda mi na jakąś zaporę ogniową

Gdy by np jakiś zablokowany atak itp można było by zingnorować .

TZN

setroubleshoot nie interesował by się tym . Przepuszczał to przez swoja bramkę itp.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...