🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #6210

Re: Script para cambiar propietario segun directorio

#6210
From: Marco A. Mateos
Date: Mon, 21 Jul 2003 21:27
40 lines
2119 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Toni wrote:

> A Dilluns 21 Juliol 2003 21:01, Marco A. Mateos va escriure:

> 
> #!/usr/bin/php
> <?php
> 
> exec( "ls /home", $dirs );
> 
> foreach( $dirs as $d ) {
>         $usr = str_replace( "/", "", $d );
>         exec( "chown ".$usr.".".$usr." \$(find -user nobody -group
> nobody)");
> }
> ?>
> 

No lo he probado, pero me da la extra�a sensacion, de que si php corre bajo
Apache, como va a poder modificar los permisos de propietario?

O lo que me dices, es que ejecute el script desde una tarea cron como root?

- -- 
Specka/DoS - Linux User: 209189 - ICQ: 172542875
www.lomejordeinternet.net - SIM, S.L.
graficas.lomejordeinternet.net - Portal de Artes Gr�icas
hosting.lomejordeinternet.net - Hosting, housing y consultoria
PGP Publica: http://www.lomejordeinternet.net/pgp/web_pub_key.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/HFrGyEVqTu+tVqsRAv/iAJ9j65wi3FXUIWixcYrCuO2j/tgGUgCgiCud
P0vF6MeUQYQ3GeYFyKMoVoo=
=zDZL
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <bfhll9$f0i6b$1@ID-187527.news.uni-berlin.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!25.red-80-25-130.pooles.rima-tde.NET!not-for-mail
References: <bfhd3t$du2gr$1@ID-187527.news.uni-berlin.de> <1uXSa.867$w4.335608@news-reader.eresmas.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,46476333518e5f61
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-07-21 14:23:55 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!25.red-80-25-130.pooles.rima-tde.NET!not-for-mail
From: "Marco A. Mateos" <marco@lomejordeinternet.net>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Script para cambiar propietario segun directorio
Date: Mon, 21 Jul 2003 23:27:34 +0200
Organization: SIM SL :: Hositng :: LMI
Lines: 40
Message-ID: <bfhll9$f0i6b$1@ID-187527.news.uni-berlin.de>
References: <bfhd3t$du2gr$1@ID-187527.news.uni-berlin.de> <1uXSa.867$w4.335608@news-reader.eresmas.com>
NNTP-Posting-Host: 25.red-80-25-130.pooles.rima-tde.net (80.25.130.25)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8Bit
X-Trace: news.uni-berlin.de 1058822634 15747275 80.25.130.25 (16 [187527])
User-Agent: KNode/0.7.2