Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Apache permissions

    Basically, this has cropped up in two of my scripts - one which creates and stores images and one which is a poll. I need to be modifying/creating files. What I don't want to do is set them to chmod 777, for obvious reasons. However, setting them to anything else returns errors indicating that permission was denied or whatever. What should I set them too? If this is not possible, can I set them to 777 temporarily and then reset them to something safe from within my PHP scripts?

    Thanks.
    skinme.net / v2.php (design nearly completed)

  • #2
    Regular Coder
    Join Date
    May 2002
    Location
    London, England
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try looking at www.php.net/chmod
    Jeewhizz - MySQL Moderator
    http://www.sitehq.co.uk
    PHP and MySQL Hosting

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This ought to help -- for one script (I haven't tested it yet). However, my issue is with creating files. Can I chmod a directory? I've tried to no avail and there seems to be no similar command specific to directories. Do I even need to?
    skinme.net / v2.php (design nearly completed)

  • #4
    New to the CF scene
    Join Date
    Jan 2003
    Location
    Amsterdam, Netherlands
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe a linux howto or manpage might help out... If you want to create files in a dir, you'll need write-access in that directory. You can set this once from within the prompt (telnet, ssh). Use chmod 666 for reading and writing files.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •