Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Greg Kaleka
Greg Kaleka
39,021 Points

Image not displaying on my site due to 403 Forbidden error

I recently added a new image to my site, which I am responsively setting as the background on small screens.

@media (max-width: 750px) {
    .hero {
    background-size: auto 100%;
    background: url('../img/pixel.png'), #666 url('../img/working-small.jpg') no-repeat center;
    padding: 40px 8px 80px 8px;
    }
}

Unfortunately, it's not working, and the image isn't showing up. The image is at spreadsheetninjas.com/img/working-small.jpg, which returns a 403 Forbidden error.

No other image on my site has this problem. If you go to spreadsheetninjas.com/img/, you'll see a list of the images on my site. Click on any one of them other than working-small.jpg, and you'll see the image. Click on that one, and you get the error page.

Any help (even with where to look!) would be appreciated.

As an unrelated issue, I would add a return button at the bottom of each section. I am using an iPad in landscape mode and it would be helpful.

Greg Kaleka
Greg Kaleka
39,021 Points

Thanks for the feedback!

1 Answer

Strange. Have you tried replacing the image? Maybe it is corrupted.

Greg Kaleka
Greg Kaleka
39,021 Points

OK, I fixed it. Somehow the permissions on the server were set to 600 (rw-------). In my FTP client, I was able to change the permissions to 644 (rw-r--r--). I have NO CLUE how that happened, but at least it's fixed :)

I actually thought of permissions, but then didn't think that would be an issue on a web site. I am glad you figured it out and let me know in case it ever happens to me.