Why am I getting permissions issues on my Font Files using Openshift
-
21-12-2019 - |
Question
I am working on a node.js project using OpenShift. Everything works great accept I get a 404 on my font awesome files. When I ssh I see...
ls app-deployments/current/repo/public/build/fortawesome/font-awesome/v4.0.3/fonts/
FontAwesome.css FontAwesome.otf fontawesome-webfont.eot fontawesome-webfont.svg fontawesome-webfont.ttf fontawesome-webfont.woff
But when I try to go to
http://<gear>/build/fortawesome/font-awesome/v4.0.3/fonts/fontawesome-webfont.woff
It says...
Cannot GET /build/fortawesome/font-awesome/v4.0.3/fonts/fontawesome-webfont.woff
http://<gear>/build/fortawesome/font-awesome/v4.0.3/fonts/fontawesome/FontAwesome.css
Works fine. It also works fine locally.
Now with permission goodness
lrwxrwxrwx. 1 * * * FontAwesome.otf
lrwxrwxrwx. 1 * * * fontawesome-webfont.eot
lrwxrwxrwx. 1 * * * fontawesome-webfont.svg
lrwxrwxrwx. 1 * * * fontawesome-webfont.ttf
lrwxrwxrwx. 1 * * * fontawesome-webfont.woff
As you can see the permissions look normal
Solution
From the permissions you posted, looks like they are symlink. Check whether your webserver has access (is following symlink) to the original file/location.
OTHER TIPS
Look inside your ~/app-root/repo directory and make sure the files are there, and that they have the correct permissions to web accessible.
configure a static route using
app.use('/fontawesome', express.static(__dirname+'/fontawesome'));