PHP - file writes - permission


#1

We have a custom built* CMS** - however we have currently have problems writing files. I’m hoping there is an elegant way out of this dilemma.

The liftport.com folder has RW for the liftportgroup user, R for everyone else. This is the way it should be of course.

xxx:~/liftport.com> ls -la *html
-rw-r–r-- 1 liftportgroup pg106443 33 2005-11-07 15:22 impressum.html
-rw-r–r-- 1 liftportgroup pg106443 4025 2005-11-07 13:35 index.html

The CMS (built using PHP) wants to write files to /liftport.com

What is the ‘best’ way to allow a PHP process to write files, while

a) retaining security
b) allowing us to keep control in the event the CMS goes berserk and we have to manually edit files and so on.

Thanks in advance,

Brian

*Yes, I know. Mambo support is provided by Dreamhost now. This solution was a ‘done deal’ over my objections. Life is a matter of picking your battles, sometimes.

** It actually is a pretty slick package, and it suits us, or seems to.

Liftport - The Space Elevator Company


#2

fixed it - the php script was it’s file to the wrong directory. this was masked by some deliberate obfuscation on the script’s part, and lameness on mine for having had to have this pointed out to me.

Points up the utility of having a second (fresh) pair of eyes look at things.

Liftport - The Space Elevator Company