Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Greg Kaleka
Greg Kaleka
39,019 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,019 Points

Thanks for the feedback!

1 Answer

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

Greg Kaleka
Greg Kaleka
39,019 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.