From: Enver ALTIN (enver.altin@frontsite.com.tr)
Date: Mon 17 Nov 2003 - 16:51:32 EST
Merhaba,
On Mon, Nov 17, 2003 at 08:36:36PM +0200, Eyüp TAŞDELEN wrote:
> merhaba 777 modunda olusturmak istedigim bir dizin apache kullanicisina ait ve sahibi okuma, grubu ve digerleri calistirma modunda olusuyor. alt dizinlerde kullanim hakki baska bir kullaniciya ait oldugundan bircok dosya islemlerinde problem yasiyorum . nasil php ile istedigim kullaniciya ait istedigim modda dizin veya dosya olusturabilirim
Unix sistemlerde bir kullaniciya ait bir process (apache) ancak
kendisine ait dosyalar olusturabilir. Bir dosyanin sahibini
degistirebilme yetkisi de yalnizca root'a aittir.
Ozetle, yalnizca PHP kullanarak yapamazsiniz; ancak PHP icerisinden
system() fonksiyonu gibi birsey yoluyla SUID-root yaptiginiz bir program
sizin icin bir dizinin yetkilerini degistirebilir, ama acikcasi ben bunu
guvenlik nedenleriyle pek onermiyorum.
Yapmaya calistiginiz seyin baska bir cozumu olmali, dogru yol bu degil
gibi gorunuyor. Ornegin FTP yaziliminiz, upload edilen her dosyanin ve
klasorun sahibini otomatik olarak apache yapabilir, sorununuz bu yolla
kokten cozulebilir.
-HTH
-- __________ | | | | Enver ALTIN (a.k.a. skyblue) | | Software developer, IT consultant | FRONT | |==========| FrontSITE Bilgi Teknolojisi A.S. |_____SITE_| http://www.frontsite.com.tr/