#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    8
    Rep Power
    0

    Deleting Files From The Web Page?


    I have an apache server up and running on a unix machine.
    On the webpage I want to click "remove-file-x" button which should delete a file (x) on the server.

    What do I do to implement this.

    1) What permission do I give on file?
    2) What configuration do I do on the Apace config

    P.S. I tried giving permission as giving chmod 777 to file (x) but that does not let me delete file from the web page. So it looks like that I have to do something extra.


    Thanks
    Anurag
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    For a quick solution: chmod 777 the folder that contains your file
    but if you want a secure way, it will be quite some more work.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    8
    Rep Power
    0
    See at the bottom of my first email. I already chmod 777. However file-to-be-deleted does not recognize webserver as one from it own group.

    What is the secure way
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    itīs not the file, but the FOLDER that you have to chmod 0777.

    a little more security would be chown the folder (again, the folder, not the file) to "apache.apache" (replace with "user.group" of your webserver) and chmod the folder 0755 and the file 0644. even better: folder 0700, file 0600
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    8
    Rep Power
    0
    Thanks... for ur reply

    While doing the method specified by you, I found out that my apache server was running as nobody.nobody and thats why I was not able to delete the the file

    Anurag

IMN logo majestic logo threadwatch logo seochat tools logo