logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

apache2 symlink dropbox błąd 403 permission denied

rafik73 04 Lip 2017 21:47 2694 4
REKLAMA
  • #1 16568885
    rafik73
    Poziom 13  
    Posty: 473
    Ocena: 13
    Witam

    Problem dotyczy symlinku umieszczonego w katalogu apacha /var/www/html/
    Nawiązuje on do katalogu /home/rafik73mint/Dropbox/WebServ/httpd
    Jest to folder dropboxa. Wybrałem to rozwiązanie, ponieważ projektuję WWW raz na lapku z windą raz na linuksie,
    stąd chmura.
    Nie wiem już co powoduje wyświetlanie:
    You don't have permission to access /httpd/ on this server.
    Apache/2.4.18 (Ubuntu) Server at localhost Port 80
    Przeszperałem net, próbowałem różnych praw dostępu, virtualhostów.
    Fakt, że większość rozwiązań była po angielsku, a u mnie ten język
    jest na poziomie zaawansowane MTV ;)
    Czy mógłby mi ktoś łopatologicznie step-by-step wyjaśnić, jak sprawić, żeby
    poprzez ten symlink można było wyświetlać stronę w przeglądarce?
    Dystrybucja Mint 18 namiętnie aktualizowana ;)[/syntax]
  • REKLAMA
  • #2 16571009
    tszczesn
    Specjalista - oldradio
    Posty: 2495
    Pomógł: 383
    Ocena: 184
    A jakie prawa ma katalog /home/rafik73mint/Dropbox/WebServ/httpd ? Nadaj go (i wszystko w środku) na własność grupy z która uruchomiony jest apache (zazwyczaj www-data) i prawa rwx. I opcja FollowSymLinks musi być ustawiona na zgodę.
  • REKLAMA
  • #3 16571247
    rafik73
    Poziom 13  
    Posty: 473
    Ocena: 13
    FollowSymLinks w którym pliku? Chodzi o apache2.conf?
    Teraz jestem w pracy i nie mam dostępu do kompa,ale z tego co pamiętam katalog httpd ma uprawnienia 777 i jest przypisany do grupy www-data. Sam symlink ma uprawnienia dla root i nie mogę tego zmienić ani chmod ani chown.

    po instrukcji stat httpd w katalogu /var/www/html

    Kod: Dos
    Zaloguj się, aby zobaczyć kod



    Plik apache2.conf, fragment konfiguracji:

    Kod: Dos
    Zaloguj się, aby zobaczyć kod


    a tu po instrukcji stat httpd w katalogu /home/rafik73mint/Dropbox/WebServ/

    Kod: Dos
    Zaloguj się, aby zobaczyć kod



    i cały czas brak dostępu 403 :(
  • REKLAMA
  • #4 16572843
    tszczesn
    Specjalista - oldradio
    Posty: 2495
    Pomógł: 383
    Ocena: 184
    Też byłem w pracy :) Sprawdziłem właśnie u siebie, i SOA#1 - u mnie działa :)
    Czy masz zdefiniowany VirtualHost z DocumentRoot ustawionym na "/var/www/html"? Typowo w katalogu "/etc/apaches2/sites-enabled" masz linki do plików z katalogu "/etc/apache2/sites-available", masz w nich zdefiniowane obsługiwane przez twój serwer hosty, domyślnie jest jeden, u ciebie powinien wskazywać właśnie na /var/www/html

    OK. katalog home/rafik73mint/Dropbox/WebServ/httpd ma dostęp dla grupy www-data, ale czy jego zawartość też? Co mówi plik error.log z apache?
  • #5 16574451
    rafik73
    Poziom 13  
    Posty: 473
    Ocena: 13
    Wklejam log

    [Fri Jul 07 21:42:03.977705 2017] [core:error] [pid 4089] [client 127.0.0.1:45538] AH00037: Symbolic link not allowed or link target not accessible: /var/www/html/httpd

    Zawartość 000-default.conf z katalogu sites-available:

    <VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html



    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
    </VirtualHost>



    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet


    Zawartość 000-default.conf z katalogu sites-enabled:

    <VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html



    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
    </VirtualHost>



    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
REKLAMA