Hallo, Am Sam, 28 Okt 2006, Al Bogner schrieb:
Am Samstag, 28. Oktober 2006 03:14 schrieb David Haller:
Am Sam, 28 Okt 2006, Al Bogner schrieb:
Am Freitag, 27. Oktober 2006 19:37 schrieb David Haller:
ssh user@host "test `stat -c '%a' public_html` -ne 755 \ && chmod 755 public_html'" [..] Schon, aber andere Varianten (ohne ') funktionieren auch nciht.
ssh user@host "test `stat -c '%a' ~/public_html` -ne 755 \ && chmod 755 ~/public_html"
Leider passt das auch nicht
*GNARF* Ich Depp! Falsche Quotes (bzw. fehlende Escapes). ssh user@domain.tld 'test `stat -c "%a" /home/user/public_html` -ne 755 && chmod 755 /home/user/public_html' [..]
Außerdem würde ich es gerne mit einem find kombinieren, etwa so:
find /home/user/public_html -type d -print0 | xargs -r -0 chmod 755 find /home/user/public_html -type f -print0 | xargs -r -0 chmod 644
ssh user@domain.tld 'test `stat -c "%a" ~/public_html` -ne 755 \ && find ~/public_html -type d -print0 | xargs -r -0 chmod 755' sollte eigentlich klappen. -dnh -- Nichts its gefährlicher als sich in Gefahr zu begeben. das merkst du spätestens dann, wenn du sein erstes Posting ins Usernetz losgelassen hast. [WoKo in dag°]