sudo apache reload

Fórumok

Sziasztok!

Debian Lenny rendszeren lenne szükségem arra, hogy egy user restart/reload-ot tudjon futtatni bizonyos szervereken. (apache, dns)
Mit kell írnom a /etc/sudoers fájlba, hogy elérjem a célom?
(Google nem adott pár perc keresés után választ, nekem meg gyorsan kéne.)

Üdv: redman

Hozzászólások

Remélem nem írok nagy baromságot, ilyenre még nem volt szükségem, de a man alapján elvileg ezt:


felhasználó ALL = /etc/init.d/apache2

Úgy néz ki fájl szintű jogosultság is kéne. (apache fastcgi-nek)
Mit lehet ilyenkor tenni?

Syntax error on line 11 of /etc/apache2/mods-enabled/fastcgi.conf:
FastCgiIpcDir /var/lib/apache2/fastcgi: access for server (uid 1000, gid 4) failed: write not allowed

(redman-ként futtattam a sudo-t uid:1000 gid:4)

http://www.redman.hu

Oké, megadtam a jogokat, de

Reloading web server config: apache2httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
failed!

Szerintem ez így nem lesz jó

http://www.redman.hu

nem tesztelt, erősen tanács kategória:

In that post one guy says:
"turns out all i needed was a folder called 'logs' in the root dir of the hosted files (/var/log/www/). i'm not sure if i needed to create the file 'error.log' in the 'logs' folder or not, but doing so caused the problem to go away. after creating said folder and file, run sudo /etc/init.d/apache2 restart and i'm back up and running."

Note that I have not yet tried them out. I plan to reinstall all things including the system again when I come back from my vocation.

ubi alatt is csak egy user teljes sudo jogú, ha jól tudom!

crounchbang részlet

group:
adm:x:4:sany
dialout:x:20:sany
cdrom:x:24:sany
plugdev:x:46:sany
lpadmin:x:108:sany
sambashare:x:109:sany
admin:x:110:sany
sany:x:1000:

sudoers:
sany ALL=NOPASSWD: ALL

szerk.
Lenny alatt nincs admin-ban

Én így csináltam meg a fejlesztői szerveren a fejlesztőknek:

# /etc/sudoers
root ALL=(ALL) ALL
User_Alias HTTPDEV=%developers, %developersoutsource, www-data
Cmnd_Alias APACHECTL = /usr/sbin/apache2ctl
HTTPDEV ALL = NOPASSWD: APACHECTL