eyeh8u (eyeh8u) wrote in php,
eyeh8u
eyeh8u
php

chown and chmod

I'm using a script to upload files to my system. That means the files are created by Apache, and I can't access them with my FTP/SSH login. I need to back up the files uploaded, and mirror them.

So, what I'm looking for is a simple (php) script to recursively chown, chgrp and chmod the files and folders on a given path.

Yes, it's easy, and yes I could write it myself. But, I don't have time to do it tonight, and it's the kind of thing loads of people have hanging around, so if anyone has code they can 'lend' me to do the job that I can just run in the morning, that'd be great.

Cheers.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 17 comments