apache2 i dotproject

Konfiguracja serwerów, usług, itp.
mihu
Posty: 11
Rejestracja: 01 grudnia 2007, 22:01
Lokalizacja: Warszawa

apache2 i dotproject

Post autor: mihu »

Próbuję zainstalować dotprojecta na swoim serwerze. Odpalam skrypt instalujący i widzę m.in.:

Kod: Zaznacz cały

If the message 'World Writable' appears after a file/directory, then Permissions for this File have been set to allow all users to write to this file/directory. Consider changing this to a more restrictive setting to improve security. You will need to do this manually.
./includes/config.php writable?    Failed Configuration process can still be continued. Configuration file will be displayed at the end, just copy & paste this and upload.
./files writable?    Failed File upload functionality will be disabled
./files/temp writable?    Failed PDF report generation will be disabled
./locales/en writable?    Failed Translation files cannot be saved. Check /locales and subdirectories for permissions.
Nie chcę dawać praw 777, mam świadomość czym to może zaowocować w przyszłości. W pewnym poradniku znalazłem taką oto wskazówkę:
Files Folder Permissions

In order for the file upload to function, you will need to provide write priviledges to the file upload folder. The "default" file upload folder is named "files" and contains an ".htaccess" file to prevent unauthorized access.

The safe way to the write permission on a POSIX system is via the following. Determine what user is running the apache web server with the following system command:

[user@localhost dotproject]# ps -ef | grep httpd

The resulting list will show you the user that is running Apache (probably apache). Change the owner of the files directory to this user:

[user@localhost dotproject]# chown -R apache files/
[user@localhost dotproject]# chmod -R 0700 files/
Wydaję polecenie:

Kod: Zaznacz cały

scooby:/var/www/dotproject# ps -ef | grep httpd
root     11657 11641  0 19:38 pts/0    00:00:00 grep httpd
scooby:/var/www/dotproject#
Nie mam zaś użytkownika apache, lecz www-data - czy o to chodzi, aby właśnie na www-data zmienić właściciela procesu? Chyba, że chodzi o to, bym prawa zmienił na roota, skoro httpd chodzi "na" roocie? Jeszcze sobie patrzę na prawa w katalogu dotproject. User 500 i grupa 500??? Cóż to za dziwy?

Kod: Zaznacz cały

scooby:/var/www/dotproject# ls -l
razem 120
-rw-rw-r--  1 500 500  1931 2007-11-05 23:35 base.php
-rw-rw-r--  1 500 500 11286 2007-11-15 03:18 ChangeLog
drwxrwxr-x  2 500 500  4096 2007-11-15 09:00 classes
-rw-rw-r--  1 500 500 18010 2005-03-11 02:34 COPYING
drwxrwxr-x  2 500 500  4096 2007-11-15 09:00 db
drwxrwxr-x  3 500 500  4096 2007-11-15 09:00 files
-rw-rw-r--  1 500 500  6326 2007-04-05 00:53 fileviewer.php
drwxrwxr-x  2 500 500  4096 2007-11-15 09:00 functions
drwxrwxr-x  4 500 500  4096 2007-11-15 09:00 images
drwxrwxr-x  2 500 500  4096 2007-11-15 09:00 includes
-rw-rw-r--  1 500 500 10983 2007-11-14 03:55 index.php
drwxrwxr-x  3 500 500  4096 2007-11-15 09:00 install
drwxrwxr-x  2 500 500  4096 2007-11-15 09:00 js
drwxrwxr-x 11 500 500  4096 2007-11-15 09:01 lib
-rw-rw-r--  1 500 500  1709 2005-04-05 16:32 LICENSE
drwxrwxr-x  4 500 500  4096 2008-01-21 19:47 locales
drwxrwxr-x  5 500 500  4096 2007-11-15 09:01 misc
drwxrwxr-x 20 500 500  4096 2007-11-15 09:01 modules
-rw-rw-r--  1 500 500  1887 2007-07-30 14:51 queuescanner.php
-rw-rw-r--  1 500 500   845 2005-04-01 02:49 README
drwxrwxr-x  5 500 500  4096 2007-11-15 09:01 style
Prośba o pomoc.
Rad
Member
Posty: 1208
Rejestracja: 28 czerwca 2006, 15:05

Post autor: Rad »

mihu pisze:scooby:/var/www/dotproject# ps -ef | grep httpd
root 11657 11641 0 19:38 pts/0 00:00:00 grep httpd
scooby:/var/www/dotproject#
Nie ma żadnego procesu httpd włączonego, nie możesz wywnioskować, że apache chodzi jako root.

Poza tym na Debianie, apache nie startuje z httpd tylko z apache2. Spróbuj wpisać:

Kod: Zaznacz cały

ps -ef | grep apache
I wtedy zobaczysz z jakiego usera i grupy korzysta daemon.
ODPOWIEDZ