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

  • Home
  • SEARCH
  • 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 8034881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:09:01+00:00 2026-06-05T02:09:01+00:00

I have a Rails site which uses the Delayed Job Gem to run a

  • 0

I have a Rails site which uses the Delayed Job Gem to run a background task. The background task takes a PDF and converts it to a series of images.

The Rails app runs as ‘nobody’ and the delayed job process runs as ‘root’.

The background task runs fine but a problem occurs when the Rails app tries to delete the file which was created by the delayed job process: I get a ‘Permission denied’ message. So ‘nobody’ can’t delete the file which was created by ‘root’.

The problem can be fixed if I set the file/folder permissions with:

    chmod -R 755 

But this does not affect new files.

I’m deploying my Rails app using Capistrano under the root account.

I’m quite the noob as a linux system admin. Can you suggestion where I’m going wrong?

Many Thanks

  • 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-06-05T02:09:04+00:00Added an answer on June 5, 2026 at 2:09 am

    So I solved my problem by following sailors advice: basically setup a new user for running the app and deployment. Not sure if this will be useful to anyone else but here’s how I transferred the site to a different user:

    Steps

    1. Create a new user called ‘www’

      useradd -d /home/www -m
      passwd www
      
    2. Give www control over the existing files:

      cd /path/to/site
      chmod -R g+ws *
      chgrp -R www *
      
    3. Killed existing delayed_job process under root account

    4. Updated the sites vhost to tell passenger which user to run as

      PassengerDefaultUser  www
      
    5. Tell cap to deploy with user www in deploy.rb

      set :user, "www"
      

    Now the delayed job process and the sites process run as ‘www’ which solves my problem.

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

Sidebar

Related Questions

I have a Ruby on Rails based site, in which I need to run
I have a site built in Ruby On Rails which has many ads in
I have a web app which uses Devise for authentication. It is a site
I have put up a new blog which uses Toto with Rails 3 and
I have an existing Rails site which is rendering very poorly on iPhone and
I have a rails app which uses omniauth to authenticate visitors via facebook. When
I have a Rails site that uses Devise for authentication. I have one page
I have a Rails 2.1.2 site that only has html templates e.g. jobs.html.erb, so
I have a Rails app hosted in Heroku. If I go the the site
I am going to be deploying a site i have built in rails 3

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.