Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Obecná podpora => Téma založeno: smoce 30 Dubna 2014, 18:37:57
-
(předmět postu pozměněn)
Ahoj lidičky,
mám problém, nainstaloval jsem přes apt-get apache2 a fungoval ok, ale změnil jsem si cestu do:
/home/martin/Programing/WWW
a zkusil jsem http://localhost hlásí 403
problém s právama tak jsme tomu nastavil
chown -R www-data:www-data /home/martin/Programing/WWW
chmod -R 777 /home/martin/Programing/WWW
sudo usermod -a -G www-data martin
a přidal jsem přes adduser do group www-data a taky nic.
takže se ptám, nevíte ještě co mám udělat ??
na netu toho moc nepíšou pořád dokola jen chown a chmod ...
Díky Martin
ERROR.log
[Wed Apr 30 18:37:02.211749 2014] [mpm_event:notice] [pid 12303:tid 139866808989568] AH00491: caught SIGTERM, shutting down
[Wed Apr 30 18:37:03.317163 2014] [mpm_event:notice] [pid 27499:tid 139850476001152] AH00489: Apache/2.4.7 (Ubuntu) SVN/1.8.8 mod_apreq2-20090110/2.8.0 mod_perl/2.0.8 Perl/v5.18.2 configured -- resuming normal operations
[Wed Apr 30 18:37:03.317278 2014] [core:notice] [pid 27499:tid 139850476001152] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 30 18:37:06.582404 2014] [core:error] [pid 27503:tid 139850351974144] (13)Permission denied: [client 127.0.0.1:52625] AH00035: access to /index.html denied (filesystem path '/home/martin/Programing/WWW') because search permissions are missing on a component of the path
ls -lart
martin@martin:~/Programing$ ls -lart
total 28
drwxrwxr-x 3 martin martin 4096 dub 26 11:05 ANSIC
drwx------ 55 martin martin 16384 dub 30 13:25 ..
drwxrwsrwx 8 www-data www-data 4096 dub 30 15:17 WWW
drwxrwxr-x 4 martin martin 4096 dub 30 15:17 .
-
tohle je prasárna
chmod -R 777 /home/martin/Programing/WWW
a asi to máte blbě nastavené
Permission denied: [client 127.0.0.1:52625] AH00035: access to /index.html denied (filesystem path '/home/martin/Programing')
protože to neodpovídá té cestě uvedené prve...
-
tohle je prasárna chmod -R 777 /home/martin/Programing/WWW
a asi to máte blbě nastavené
Permission denied: [client 127.0.0.1:52625] AH00035: access to /index.html denied (filesystem path '/home/martin/Programing')
protože to neodpovídá té cestě uvedené prve...
Prasárnou se to stáva tehdy, když to funguje, jak má ..
a cesty jsou správné, jen jsem hodil log s jinou cestou , zkoušel jsem to různě předělávat jinam a s jinýma právama.. ještě zkusím jádro dát jinačí ..
-
jádro? když máte blbě zkonfigurovanej apache?
-
jádro? když máte blbě zkonfigurovanej apache?
ano jádro, protože pokud vím, tak o oprávnění se stará kernel.. pokud se pletu tak moje chyba.
ale apache2 jsem dřív nastavoval často a na takový problém jsem nenarazil. Až teď u 14.04
a co je tedy špatně nastavené ?
protože cesty jsou zadané absolutní , takže by to problém být neměl...
-
syntaxe konfigurace apache se změnila, takže pokud nastavujete po paměti jako dřív, tak to máte pravděpodobně špatně
http://askubuntu.com/questions/362682/403-error-after-upgrading-to-apache2-4 (http://askubuntu.com/questions/362682/403-error-after-upgrading-to-apache2-4)
-
syntaxe konfigurace apache se změnila, takže pokud nastavujete po paměti jako dřív, tak to máte pravděpodobně špatně
http://askubuntu.com/questions/362682/403-error-after-upgrading-to-apache2-4 (http://askubuntu.com/questions/362682/403-error-after-upgrading-to-apache2-4)
Toto jsem si ověřoval a syntaxy mám dobře.
Ale už vím, kde by mohla být chyba... když si vytvořím složku:
/data/www/
a apache nasměruji do ní, tak to funguje OK, ale když vytvořím složku:
/home/martin/..
tak to na mě řve práva..
když jsem dřív měl 12.10 a apache2.2 tak to jelo v pohodě, ale to jsem taky měl kernel 3.5
pak jsem udělal upgrade na 14.04 s apache2.4 a kernel 3.10 a pak i 3.14.2 a to už nejelo v /home/martin/..
a teď jsem si nainstaloval zpět 12.10 a apache2.2 , ale musel jsem povýšit na kernel 3.10 kvůli nové wifi kartě Intel AC 7260, která má officiálně drivery až od kernelu 3.10.
takže osobně si myslím,že to není o nastavení apache, ale o nějakém fixu práv v novým kernelu, kterýmu se něco nelíbi.
Nějaké rady?
-
je to kmplexni .. neda se zmenit jen nastaveni DokumentRoot a cekat, ze vse pujde samo spravne .. musi se minimalne jeste prenastavit samozrejme direktivy pro <Directory $dir> a mozna par dalsich veci ..
a httpd navic pekne loguje, muzes mu zvysit verbositu .. dyk se prosim koukni do toho logu :D
hledej "LogLevel" a "ErrorLog"
# egrep ^LogLevel\|^ErrorLog httpd.conf
ErrorLog "/var/apache/log/error_log"
LogLevel warn
-
je to kmplexni .. neda se zmenit jen nastaveni DokumentRoot a cekat, ze vse pujde samo spravne .. musi se minimalne jeste prenastavit samozrejme direktivy pro <Directory $dir> a mozna par dalsich veci ..
a httpd navic pekne loguje, muzes mu zvysit verbositu .. dyk se prosim koukni do toho logu :D
hledej "LogLevel" a "ErrorLog"
# egrep ^LogLevel\|^ErrorLog httpd.conf
ErrorLog "/var/apache/log/error_log"
LogLevel warn
Ahoj,
httpd nepoužívám, ale v apache sites-enabled/..
mám nastavené správně DocumentRoot & <directory...>
co se týče logování v apache2.conf mám :
ErrorLog ${APACHE_LOG_DIR}/error.log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warnNastavoval jsem i debug ale napsalo to jen error:
# cesta v documentroot & <directory na /home/martin/Programing/WWW
[Thu May 01 17:15:50 2014] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
takže to stejne co už jsem nahoře posílal ..
ale v /var/www a /data/www co jsem vytvořil to jde, ale možná bude problém v tom, že jsem při instalaci dal HOME složku, aby to šifrovalo.. ale stejně tohle by na to nemělo mít vliv..
-
Ahoj,
httpd nepoužívám ...
httpd je samotny apache ;) .. nicmene dokud neukazes svuj httpd.conf tak nevim, jestli Tve pokusu povedou k rozumnemu vysledku .. dalsi vec, na kterou je treba brat ohled, muze byt apparmor a nebo selinux ..
-
Ahoj,
httpd nepoužívám ...
httpd je samotny apache ;) .. nicmene dokud neukazes svuj httpd.conf tak nevim, jestli Tve pokusu povedou k rozumnemu vysledku .. dalsi vec, na kterou je treba brat ohled, muze byt apparmor a nebo selinux ..
špatně jsem se vyjádřil, httpd.conf býval dřív nebo u jiných distribucí pokud se nepletu, ale u ubuntu jsem dlouho nevidel httpd.conf ale byl pojmenovan apache2.conf..
Toto je nastavení, nynějšího APACHE 2.2 na ubuntu 12.10 a kernelu 3.10
cesta na /data/www funguje OK a hází mě 200.
když cestu změním na /home/martin/Programing/WWW nebo na /home/martin/WWW (či jinou složku hází 403-permission error)
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives and /usr/share/doc/apache2-common/README.Debian.gz about
# Debian specific hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.
# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
# /etc/apache2/
# |-- apache2.conf
# | `-- ports.conf
# |-- mods-enabled
# | |-- *.load
# | `-- *.conf
# |-- conf.d
# | `-- *
# `-- sites-enabled
# `-- *
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
# together by including all remaining configuration files when starting up the
# web server.
#
# In order to avoid conflicts with backup files, the Include directive is
# adapted to ignore files that:
# - do not begin with a letter or number
# - contain a character that is neither letter nor number nor _-.
# - contain .dpkg
#
# * ports.conf is always included from the main configuration file. It is
# supposed to determine listening ports for incoming connections, and which
# of these ports are used for name based virtual hosts.
#
# * Configuration files in the mods-enabled/ and sites-enabled/ directories
# contain particular configuration snippets which manage modules or virtual
# host configurations, respectively.
#
# They are activated by symlinking available configuration files from their
# respective *-available/ counterparts. These should be managed by using our
# helpers a2enmod/a2dismod, a2ensite/a2dissite. See
# their respective man pages for detailed information.
#
# * Configuration files in the conf.d directory are either provided by other
# packages or may be added by the local administrator. Local additions
# should start with local- or end with .local or .local.conf to avoid name
# clashes. All files in conf.d are included
#
# * The binary is called apache2. Due to the use of environment variables, in
# the default configuration, apache2 needs to be started/stopped with
# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
# work with the default configuration.
# Global configuration
#
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
LockFile ${APACHE_LOCK_DIR}/accept.lock
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
# graceful restart. ThreadLimit can only be changed by stopping
# and starting Apache.
# ThreadsPerChild: constant number of worker threads in each server process
# MaxClients: maximum number of simultaneous client connections
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxClients: maximum number of simultaneous client connections
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# These need to be set in /etc/apache2/envvars
User www-data
Group www-data
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
# It is also possible to omit any default MIME type and let the
# client's browser guess an appropriate action instead. Typically the
# browser will decide based on the file's extension then. In cases
# where no good assumption can be made, letting the default MIME type
# unset is suggested instead of forcing the browser to accept
# incorrect metadata.
#
DefaultType None
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel debug
# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf
# Include list of ports to listen on and which to use for name based vhosts
Include ports.conf
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# Include of directories ignores editors' and dpkg's backup files,
# see the comments above for details.
# Include generic snippets of statements
Include conf.d/
# Include the virtual host configurations:
Include sites-enabled/a v ports.conf
NameVirtualHost *:80
Listen 80
a sites-enabled/000-default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "/data/www"
# <Directory />
# Options Indexes FollowSymLinks MultiViews
# AllowOverride None
# Order allow,deny
# Allow from all
# </Directory>
<Directory "/data/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
# zkusil jsem i debug...
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
-
hmm, si asi děláte z lidí srandu...
Toto je nastavení, nynějšího APACHE 2.2 na ubuntu 12.10 a kernelu 3.10
vs
[Wed Apr 30 18:37:03.317163 2014] [mpm_event:notice] [pid 27499:tid 139850476001152] AH00489: Apache/2.4.7 (Ubuntu) SVN/1.8.8 mod_apre...
+
ale v /var/www a /data/www co jsem vytvořil to jde, ale možná bude problém v tom, že jsem při instalaci dal HOME složku, aby to šifrovalo.. ale stejně tohle by na to nemělo mít vliv..
-
hmm, si asi děláte z lidí srandu...
Toto je nastavení, nynějšího APACHE 2.2 na ubuntu 12.10 a kernelu 3.10
vs
[Wed Apr 30 18:37:03.317163 2014] [mpm_event:notice] [pid 27499:tid 139850476001152] AH00489: Apache/2.4.7 (Ubuntu) SVN/1.8.8 mod_apre...
+
ale v /var/www a /data/www co jsem vytvořil to jde, ale možná bude problém v tom, že jsem při instalaci dal HOME složku, aby to šifrovalo.. ale stejně tohle by na to nemělo mít vliv..
ne původně jsem měl nainstalovaný apache 2.4 v 14.04 ale přestalo mě to bavit tak jsem si dal 12.10, kde mi to dřív jelo bez problému, ale dal jsem tam kvůli nové wifi kartě nový kernel a nyní to tam taky nejde a tam je apache 2.2 v repozitářích .. a průběžně jsem to psal v postech .. takže vzít citaci z posledního postu a vzít log z prvního . není objektivní ..
-
hmm, si asi děláte z lidí srandu...
Toto je nastavení, nynějšího APACHE 2.2 na ubuntu 12.10 a kernelu 3.10
vs
[Wed Apr 30 18:37:03.317163 2014] [mpm_event:notice] [pid 27499:tid 139850476001152] AH00489: Apache/2.4.7 (Ubuntu) SVN/1.8.8 mod_apre...
+
ale v /var/www a /data/www co jsem vytvořil to jde, ale možná bude problém v tom, že jsem při instalaci dal HOME složku, aby to šifrovalo.. ale stejně tohle by na to nemělo mít vliv..
protoze to mas cely spatne .. pokud schces zmenit pro apache DocumentRoot, tak s tim musis zmenit i dalsi direktivy na dalsich mistech vsetne nastaveni aplikace (typicky per-site etc/apache2/conf.d/whatever.conf)
v tom co jsi ukazal je jasne, ze ti /home/martin/foo kdyz to nemas nastaveny vsude, kde to mas mit .. copak to z toho nevidis ? ostatne uz jsem to drive psal, napisu to proto jeste jednou a tucne:
nastaveni jineho DocumentRootu se neda obvykjle udelat jen touto zmenou jedne promene v konfiguracich apache
-
protoze to mas cely spatne .. pokud schces zmenit pro apache DocumentRoot, tak s tim musis zmenit i dalsi direktivy na dalsich mistech vsetne nastaveni aplikace (typicky per-site etc/apache2/conf.d/whatever.conf)
v tom co jsi ukazal je jasne, ze ti /home/martin/foo kdyz to nemas nastaveny vsude, kde to mas mit .. copak to z toho nevidis ? ostatne uz jsem to drive psal, napisu to proto jeste jednou a tucne:
nastaveni jineho DocumentRootu se neda obvykjle udelat jen touto zmenou jedne promene v konfiguracich apache
Jsem si vědom, že jsi říkal, že změnit na více místech DocumentRoot.
ale dívám se do složky :
martin@martin:~$ ls /etc/apache2/conf.d/
apache2-doc javascript-common.conf other-vhosts-access-log
charset localized-error-pages security
a v ani jednom nejsou cesty žádné ..
a ani v ostatních souborech , nejsou žádné cesty podobné..(do mods-.. jsem se nedíval)
stejně dělal jsem to dřív už párkrát a nikdy jsem na tento problém s právama nenarazil.. a nezdá se mi , že by to bylo v apache.. spíš se mi zdá že by to mohlo být v cestě k té složce .. že třeba složka má práva dostatečná , ale ty složky přední už nemají takové práva...
-
a jako bonus ta cesta neexistuje, dokud se nepřihlásíte, ale to jistě nemá vliv...
-
muzes mi prosim ukazat vystup z:
egrep -rI home/martin\|/www /etc/apache2
-
muzes mi prosim ukazat vystup z:
egrep -rI home/martin\|/www /etc/apache2
root@martin:/var/log/apache2# egrep -rI home/martin\|/www /etc/apache2
/etc/apache2/mods-available/mime.conf:# See http://www.iana.org/assignments/character-sets for the
/etc/apache2/conf.d/localized-error-pages:#ErrorDocument 402 http://www.example.com/subscription_info.html
/etc/apache2/sites-available/default-ssl: DocumentRoot /home/martin/Programing/WWW
/etc/apache2/sites-available/default-ssl: <Directory /home/martin/Programing/WWW>
/etc/apache2/sites-available/default: DocumentRoot "/home/martin/Programing/WWW"
/etc/apache2/sites-available/default: <Directory "/home/martin/Programing/WWW">
/etc/apache2/magic:# mime types according to http://www.geocities.com/nevilo/mod.htm:
/etc/apache2/magic:# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
/etc/apache2/magic:# http://www.macromedia.com/software/flash/open/
/etc/apache2/magic:# <http://www.namazu.org/>
/etc/apache2/magic:# http://www.djvuzone.org/
/etc/apache2/magic:# this is from source (http://www.adrift.org.uk/) and I have some taf
-
hmm .. httpd obvykle bezi pod nejakym uzivatelem aka "webservd", "apache", "httpd", cokoliv .. over, ze ma tenhle uzivatel prava pro cteni do toho tveho home/martin/Programming/WWW ...
# ps -ef | grep httpd | head -n1 | perl -pe 'chomp($foo = `pwd`); s@$foo/@@'
webservd 15846 15839 0 Apr 29 ? 0:20 /usr/apache2/2.2/bin/httpd -f httpd.conf -k start
me bezi pod timhle uzivatelem
-
hmm .. httpd obvykle bezi pod nejakym uzivatelem aka "webservd", "apache", "httpd", cokoliv .. over, ze ma tenhle uzivatel prava pro cteni do toho tveho home/martin/Programming/WWW ...
# ps -ef | grep httpd | head -n1 | perl -pe 'chomp($foo = `pwd`); s@$foo/@@'
webservd 15846 15839 0 Apr 29 ? 0:20 /usr/apache2/2.2/bin/httpd -f httpd.conf -k start
me bezi pod timhle uzivatelem
noo zajimavé:
root@martin:/var/log/apache2# ps -ef | grep httpd | head -n1 | perl -pe 'chomp($foo = `pwd`); s@$foo/@@'
root 17508 2520 0 18:49 pts/0 00:00:00 grep --color=auto httpd
a když jsem změnil httpd za apache:
root@martin:/var/log/apache2# ps -ef | grep apache | head -n1 | perl -pe 'chomp($foo = `pwd`); s@$foo/@@'
root 16861 1 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
-
ještě jsem upravil příkaz:
root 16861 1 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16865 16861 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16866 16861 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16867 16861 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16868 16861 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16869 16861 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16870 16861 0 18:41 ? 00:00:00 /usr/sbin/apache2 -k start
a www-data
martin@martin:~$ ls -lart /home/martin/Programing/
total 12
drwxrwsr-x 3 martin www-data 4096 May 1 11:35 .
drwx------ 29 martin martin 4096 May 1 18:57 ..
drwxrwsrwx 2 www-data www-data 4096 May 1 18:59 WWW
dal jsem si reboot a to jedno spusteni uzivatelem root jsem asik udelal ja ..
-
no, a uz to teda funguje nebo ne ?
-
no, a uz to teda funguje nebo ne ?
Boužel ne, nefunguje, jen jsem říkal, že jsem to ručně pustil jako root tak to taky nefungovalo ..
-
nastav prioritu na debug a ukaz nam error_log a access_log ..
samozrejme tu slozku eg DocumentRoot nemusi primo vlastnit ten uzivatel pod kterym je spustenej proces apache2 .. staci, aby mel prava na cteni, ale mel by to mit i v podslaozkach ..
nicmene zvedbi tu prioritu, restartuj apache2 a ukaz ty logy .. dale to muze zpusobovat apparmor a nebo selinux .. zkus je povypinat pokud ti bezi
-
samozrejme tu slozku eg DocumentRoot nemusi primo vlastnit ten uzivatel pod kterym je spustenej proces apache2 .. staci, aby mel prava na cteni, ale mel by to mit i v podslaozkach ..
drwxrwsrwx 2 www-data www-data 4096 May 1 18:59 WWW
pokud se nepletu tak drwxrwsrwx má všechno na full ...
log:
[Thu May 01 19:26:47 2014] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
[Thu May 01 19:28:30 2014] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
[Thu May 01 19:40:06 2014] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
[Thu May 01 19:40:07 2014] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
[Thu May 01 19:42:27 2014] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
nic víc
a ten apparmor ještě nějak vypnu, musím vygooglovat jak píše mi to pod rootem
You do not have enough privilege to read the profile set.
-
Tak jsem odinstaloval Apparmor a selinux a udělal reboot a žádna změna..
Forbidden
You don't have permission to access / on this server.
Apache/2.2.22 (Ubuntu) Server at localhost Port 80