WordPress.org

Ready to get started?Download WordPress

Forums

Uploads work, but not properly chmod'ed (6 posts)

  1. unco
    Member
    Posted 10 years ago #

    Hi -
    My file/image uploads work, but the attributes of the file are just 600, meaning we can't see them after they're uploaded. Has anyone else had this problem and found a way to resolve it? Any help is greatly appreciated.
    Thanks!

  2. southerngal
    Member
    Posted 10 years ago #

    I have to CHMoD my images to 777 as my server is weird. I try at 766 but it doesn't work. Could be just a server thing...

  3. unco
    Member
    Posted 10 years ago #

    Is it typical to have to manually chmod?
    Thanks,
    Beth

  4. Laughinglizard
    Member
    Posted 10 years ago #

    I have been meaning to answer this question but got caught up in other items. The problem might be two fold in your case...and consequently, there are a couple of ways to solve it.
    1) (If you have ssh access to your webserver AND have some admin priviledges on the server) The directory that you are uploading into has to be writeable by the webserver service (apache in most cases) and the files that are uploaded simply inherits the permissions of the directory they are put into. So if you have ssh (or telnet) access to your webserver, type
    chmod -R 766 */path_to/uploads_directory_name*
    You also have to make sure that the directory is owned by the webserver service. To do this without messings things up too much, type
    chgrp apache */path_to/uploads_directory_name* (here I am considering that the webserver service is started by a user who belongs to the "apache" group, if you are completely confused, send me an email and I will try to help)
    2) (if you host your blog on a webhost, not your own, so restricted access) Ask your webhost to please make sure your uploads directory from above is writeable by the webserver service (and you). They will figure out their own way. Then do the
    chmod -R 766 */path_to/uploads_directory_name*
    This should make the uploads directory work correctly.

  5. Anonymous
    Unregistered
    Posted 10 years ago #

    Here's what I have inside the main blog directory, a directory called uploads:
    drwxrwxrwx 2 apache apache 4096 Oct 26 14:36 uploads (766 wouldn't let me do any uploads)
    I upload a file called Sample.jpg and I can see it here -
    -rw------- 1 admin79 admin79 9894 Oct 28 16:03 Sample.jpg
    It's owned by the username I used to install WordPress.
    I end up having to manually chmod to make the image visible to the world. :(

  6. Laughinglizard
    Member
    Posted 10 years ago #

    Looks like the apache service is running under the user admin with the group admin, try chgrp admin uploads and chown admin uploads

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.