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
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts

    CHMOD for Image Upload

    Hi guys,

    Using PHP to upload images to my server to a correct directory.
    All working fine locally but on my linux box I have made the appropriate directory CHMOD 777.

    I was wondering if I could leave it at 755. I have built a CMS to do all changes and am only one with access to it.

    Is my CMS a public user and hence requires 777 access to write?

    On another note does 777 a directory mean that all sub directories are 777?

    D.
    Daemonkin.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com

  • #2
    New Coder
    Join Date
    Nov 2007
    Posts
    72
    Thanks
    0
    Thanked 1 Time in 1 Post
    Generally, when you want to upload files to a folder, you generally want it set to 777. I've never tried it but, you may be able to set the folder to 755 and then through PHP change the permissions to 777 before the upload and put it back afterwards. It may work since it's a server-side script but it may not; you just have to try it.

    Also, if you set a directory to 777, the subs are not set that way too. In most IDEs and FTP programs, you have the option to change subs with it but, by itself, no.

  • Users who have thanked aWishResigned for this post:

    daemonkin (11-26-2007)

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Thanks for the reply. I never thought of changing it back after uploading the image. I may just give that a try!

    D.
    Daemonkin.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com

  • #4
    New Coder
    Join Date
    Sep 2006
    Location
    Lithuania
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i see that this is question is not in right section 'Client side'. form client side you cannot do anything with server folder permissions... Only php or other programming language can do this check manual for chmod function


  •  

    Posting Permissions

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