• 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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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…

    Thread Starter unco

    (@unco)

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

    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.

    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. ??

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Uploads work, but not properly chmod’ed’ is closed to new replies.