Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6893763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:41:57+00:00 2026-05-27T06:41:57+00:00

I am running Ruby on Rails 3.0.9 in production mode on a remote VPS

  • 0

I am running Ruby on Rails 3.0.9 in production mode on a remote VPS machine running Ubuntu 10.04 LTS (in development mode I use RoR on a MAC OS Snow Leopard) and I would like to know how to manage the following scenario.

I use Apache2 and Phusion Passenger and I have set Virtual Host as-like this:

<VirtualHost *:80>
  ServerName project_name.com
  DocumentRoot /srv/www/project_name.com/public

  <Directory /srv/www/project_name.com/public>
    AllowOverride all
    Options -MultiViews
  </Directory>
</VirtualHost>

More, I use the Paperclip gem and, as a lot of people on the web using it in production mode, I get the following error on handling (image) files:

Errno::EACCES (Permission denied - /srv/www/project_name.com/public/images/001):
...

I heard that a solution in order to avoid those kind of errors is to set properly folder permissions (manually! – I don’t know if it is possible to automate that “setting” process… BTW: is it possible?) but I think there is a better way to solve that. If so, what can\should I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:41:58+00:00Added an answer on May 27, 2026 at 6:41 am

    @M. Cypher is close, although the biggest issue I see is that you’re allowing users to upload arbitrary files and then marking them all executable. This is a disaster looking for a place to happen.

    find /srv/www/project_name.com/public -type d -exec chmod 755 {}\;
    find /srv/www/project_name.com/public -type f -exec chmod 644 {}\;
    

    This will set executable on directories (necessary) but not on files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running Ruby on Rails 3.0.9 in a remote VPS machine running Ubuntu
I am successfully running my Ruby on Rails 3.0.9 application in production mode on
I was trying to get the latest ruby on rails for my Mac running
I have site running rails application and resque workers running in production mode, on
I've deployed my rails application on a staging/production machine running Apache and Phusion Passenger
I am running a ruby on rails app in the production environment and my
I have a ruby on rails app running a server and sometimes it needs
I have a Ruby on Rails app running on my server, and I can't
I'm looking at ways to deploy a Ruby on Rails app (running on JRuby)
We're using EngineYard Cloud to deploy our Ruby on Rails application. We are running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.