Privacy guaranteed - Your email is not shared with anyone.

Welcome to Glock Forum at

Why should YOU join our forums?

  • Reason #1
  • Reason #2
  • Reason #3

Site Description

wordpress and file permissions

Discussion in 'Tech Talk' started by mdehoogh, Nov 22, 2010.

  1. mdehoogh


    Jun 28, 2009
    Fort Worth, TX
    A friend of mine hosts my website on his server. It's nothing critical and I mostly use it as a "cloud" storage so that I can transfer files easily between computers without a flash drive.

    I installed wordpress (blogging software) on it and was going to edit the stylesheet. Wordpress has a built in editor where I can change the code and it will rewrite it for me but it said that I would need to change the file permissions in order for it to work.

    I have the wordpress files installed in the /blog/ subdirectory and when I log into cPanel, I can see the option to edit file permissions. When I click on the /blog/ directory, the permissions are set as such:

    On the wordpress website there's a section that covers file permissions and it says "All files should be owned by your user account on your web server, and should be writable by your username. Any file that needs write access from WordPress should be group-owned by the user account used by the webserver." and "If you want to use the built-in theme editor, all files need to be group writable."

    This leads me to believe that I should change the permissions so that GROUP has write access and should be 775 instead of 755. I'm not sure if I should change the permissions of the entire /blog/ directory or if I should move lower down the tree and just change permissions of the /style.css files and any other specific files that may need write permissions.
  2. Linux3


    Dec 31, 2008
    First off, are you sure your username and group and the same as the /blog install?

    Can you shell/ssh into the server? If so at the prompt type: id
    This will return username and group name.

    next, be sure you are in the /blog directory and type: ls -al

    This will return a long list of all files and directories with the username and group.
    Do they match?
    ps -ef |grep httpd
    ps -ef |grep apache
    This will tell you if you own the daemon. You must.

    I don't really understand why you would need 775 permissions as only one user will be writing to the directory. I know, I read these docs:

    Anything web facing should have it's permissions changed with great temerity. I would NOT start at the /blog level.

  3. mdehoogh


    Jun 28, 2009
    Fort Worth, TX
    I do not know how to shell/ssh into but then, I've never tried so I don't know if I'm actually unable to or if its just a matter of never trying it.

    I have an FTP account that I use to upload files. For anything more involved than a simple upload/download, I log in by typing :2082 at the end of the domain to get into cPanel

    I have one SQL database which I used for Wordpress. There are, however, two users for the database, "username_matthew" (which is my name) and "username_blog" and I do not remember which one I used to install Wordpress. Do you know a way I can find out which was used for the installation? I do see an option to re-install it and since I have no content on the blog, it wouldn't really inconvenience me to do that.
  4. grokdesigns


    Dec 23, 2004
    Chandler, AZ
    Open the 'wp-config.php' file in the directory you installed WP in. It will have DB name, username, password, etc.
    Last edited: Nov 24, 2010
  5. mdehoogh


    Jun 28, 2009
    Fort Worth, TX
    I got it figured out. I was able to contact my buddy who is hosting it for me and he said to just edit the permissions of the directory for that particular stylesheet. I changed it to full 777 permissions just to finish editing some stuff. After I got everything arranged I changed back to the default permissions.