Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 15 of 15

This is a discussion on directory permissions in the Shared & Semi-Dedicated forum
I am trying to install Wordpress one of my sites. The files are in: site.com/wordpress When I do the install Wordpress's setup page complains that ...

  1. #1
    JPC Member
    Join Date
    Apr 2006
    Posts
    20

    directory permissions

    I am trying to install Wordpress one of my sites. The files are in:

    site.com/wordpress

    When I do the install Wordpress's setup page complains that it doesn't have write permissions for the wordpress directory. The only way I can get it to work is to set the directory to 777 which I rather not do. Setting the permissions to 755 should be enough. Is this an apache config problem?

    I am running on a VPS with CentOS and InterWorx.

    Thanks,
    -Mike

  2. #2
    Friendly rainboy's Avatar
    Join Date
    Apr 2006
    Location
    Eindhoven, The Netherlands
    Posts
    546
    My guess it has to do with the user accessing it, remember that 755 means that the owner only has rw, the owner is probably the account where you did set it up with. The apache server is not running under this user, so it needs access as well. If you then give 777 (user - group - world) then also the apache user has access to write, and yes that is something you rather would not use. So you have to get a way to get apache to write in the directory as well. Probably by adding it to the users group ?????

    Not sure with this though, i am not familiar with wordpress and in which directory it wants to write.

    Kind regards
    Patrick

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    IIRC, the only reason that the wordpress directory needs to be world-writable is to allow it to write the configuration file. Once that's done I think you can restore it to 755 and you'll be fine.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  4. #4
    JPC Member
    Join Date
    Apr 2006
    Posts
    20
    Quote Originally Posted by rainboy
    My guess it has to do with the user accessing it, remember that 755 means that the owner only has rw, the owner is probably the account where you did set it up with. The apache server is not running under this user, so it needs access as well. If you then give 777 (user - group - world) then also the apache user has access to write, and yes that is something you rather would not use. So you have to get a way to get apache to write in the directory as well. Probably by adding it to the users group ?????

    Not sure with this though, i am not familiar with wordpress and in which directory it wants to write.

    Kind regards
    Patrick
    Yeah, I agree. I think it's a group problem. I am using InterWorx so I am not sure if that comes into play at all. I'll take a look at the /etc/group file to see if I notice anything. Right now the wordpress directory's user and group is set to username of my account:

    drwxr-xr-x 1 obriensi obriensi ................. wordpress

    -Mike

  5. #5
    JPC Member
    Join Date
    Apr 2006
    Posts
    20
    Quote Originally Posted by jason
    IIRC, the only reason that the wordpress directory needs to be world-writable is to allow it to write the configuration file. Once that's done I think you can restore it to 755 and you'll be fine.

    --Jason
    Wordpress has a admin panel that I believe writes to some directories under the wordpress main directory off of DocumentRoot. I would think I'd run into a problem there also. I can give it a try and install it with 777 and then change it back to 755 and see what happens.

  6. #6
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,648
    I just checked my blog and it's permission is 755. I don't remember having to set them at 777 initially.

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  7. #7
    JPC Member
    Join Date
    Apr 2006
    Posts
    20
    Quote Originally Posted by Connie
    I just checked my blog and it's permission is 755. I don't remember having to set them at 777 initially.
    Connie, Are you running your site from a VPS?

    Thanks,
    -Mike

  8. #8
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,648
    No I'm on a shared server.

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  9. #9
    JPC Member
    Join Date
    Apr 2006
    Posts
    20
    I've been exchanging emails with support and they have suggested setting permissions to 777 (like mentioned above) and then setting it back to 755 after the install. While this might work I don't want to do this because I am bound to run into issues later with any software that writes to subdirectories. On a correctly configured server 755 should be sufficient. Support also suggested setting the group to 'nobody' which is what they said apache runs as. I tried this also...didn't work. Has anyone else that's running on a VPS have problems with directory and/or file permissions? It's probably something small that I am overlooking.

    Thanks,
    -Mike

  10. #10
    JPC Member
    Join Date
    Apr 2006
    Posts
    20
    I just realized that non of my PHP scripts can write to subdirectories unless they are set to 777. Or 775 if I change the group to 'apache' (not 'nobody' as support suggested). Anyone else have this problem? Support has been working on it the whole day but so far no resolution. I am searching around for a solution at the same time. I am starting to think this is a Interworx related issue...not sure though.

  11. #11
    Friendly rainboy's Avatar
    Join Date
    Apr 2006
    Location
    Eindhoven, The Netherlands
    Posts
    546
    Sounds like apache is running as user ' apache' and not as nobody, what do see if you do a : ps -ef |grep httpd

    if the user is nobody you should use the nobody group, if you user is apache you should use the apache group.

    This is different between linux distributions. CentOS with Cpanel on default uses nobody. But have here a Fedora distribution which uses Apache as default.

    Kind regards,
    Patrick

  12. #12
    Smo
    Smo is offline
    JPC Addict
    Join Date
    Nov 2002
    Location
    Finland
    Posts
    218
    I got 2 folders set as 777 for image upload folders, 755 didnt work.

    how do you set group to 'apache' or nobody'?

  13. #13
    Friendly rainboy's Avatar
    Join Date
    Apr 2006
    Location
    Eindhoven, The Netherlands
    Posts
    546
    either:

    chown user.group filename
    where user = the user and the group is the group.

    or
    chgrp group filename
    where group is obviously the group name.

    Both can use the -R option (operate on files and directories recursively)

    Kind regards,
    Patrick

    p/s as always make sure you do the right thing as command line commands are non-reversible.

  14. #14
    JPC Member
    Join Date
    Apr 2006
    Posts
    20
    I got it to work with permissions set to 755 by installing and turning on suPHP. This allows PHP to run as the user rather than 'apache' or 'nobody' (depending on the platform).

  15. #15
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,648
    Glad you got it worked out hmobrien.

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

Bookmarks

Posting Permissions

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