Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Perlscript(CGI) als root ausführen

Empfohlene Antworten

Veröffentlicht

mein problem ist, das ich ein perl-script habe, das ich nur als root ausführen kann

(es werden programme aufgerufen die root-rechte benötigen)

wenn ich das jetzt vom apache ausführen lasse kommt der fehler das ich nicht root bin

chmod u+s datei hat auch nicht geholfen

hat jemand von euch eine gute idee oder das selbe problem????

Ein CHMOD von 0755 (Oktal) sollte ausreichen:

chmod 0755 file

Dadurch ist "others" das ausführen erlaubt.

Hi,

wieso geht das mit dem s-Bit nicht? Was kommt genau für eine Meldung?

Ich glaube der Apache muss mit s-Bit Unterstützung kompiliert werden.

Schau dir mal "suexec" an.

Have a nice DaY

[bRAIN2fast]

@ phillip lenz

ja da geht auch

aber das problem is das das script andere programme aufruft die UNBEDINGT root-rechte benötigen

@ bRAIN2fast

und was muss ich da genau einstellen??

Originally posted by Philipp Lenz

Ein CHMOD von 0755 (Oktal) sollte ausreichen:

chmod 0755 file

Dadurch ist "others" das ausführen erlaubt.

Das ist nicht das Problem. Es geht darum ein Programm/Skript mit

der Userid "0" zu starten. Nicht mit "Others".

Have a nice DaY

[bRAIN2fast]

danke!

hatte ich gestern aber auch schon gefunden

das klappt leider nicht so wie gedacht

Is the target user NOT superuser?

Presently, suEXEC does not allow 'root' to execute CGI/SSI programs.

Is the target group NOT the superuser group?

Presently, suEXEC does not allow the 'root' group to execute CGI/SSI programs.

Dafür gibt es /usr/bin/suidperl

eventuel musst du noch das suid-bit setzen

Shebang-line ändern, das Skript mit passenden Rechten versehen (also

SUID-Bit gesetzt, User root) und dann sollte es gehen

sicherheitstechnische belehrung erspar ich mir jetzt mal ;)

/Orb

geht auch nicht so richtig:

Insecure $ENV{PATH} while running setuid at ./clients.pl line 6.

perldoc perlsec

"For "Insecure $ENV{PATH}" messages, you need to set $ENV{'PATH'} to a known value, and each directory in the path must be non-writable by the world. A frequently voiced gripe is that you can get this message even if the pathname to an executable is fully qualified. But Perl can't know that the executable in question isn't going to execute some other program depending on the PATH. "

OK,

hab ich gemacht und der Fehler is weg

aber es is immer noch das selbe problem

ich rufe darüber iptables auf und bekomme diese fehlermeldung:

modprobe: Can't locate module ip_tables

iptables v1.2.1a: can't initialize iptables table `filter': Permission denied (you must be root)

Perhaps iptables or your kernel needs to be upgraded.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.