views:

38

answers:

1

Hi All, I am calling a controller method to convert a video file. This process is called using background_fu job. When the function tries to create a new folder in rails root it gives error i.e. Permission denied. The function performs well if not called in background job process.

Can any one point out what can be the trouble. Thanks in advance, Anubhaw

A: 

Check to see if the background process is running under a different user account to the one being used by your Rails application. On Linux/UNIX you can generally get this information by running the top or ps command.

John Topley
Hi John,Thanks for reply. For running the enqueued background process daemon server is used. The command to start the daemon server is "ruby ./script/daemons start". When i do ps -ef, it lists the daemon server under user name "avahi 1835 1 0 10:04 ? 00:00:00 avahi-daemon: running [linux-2.l". I dont have a user named avahi. Can i set specific user to be associated with daemon server?Thanks,Anubhaw
Anubhaw
Hi Anumhaw. There must be an existing user account for avahi because otherwise the daemon wouldn't be able to run. Upon investigation, background_fu uses the `daemons` gem, so you need to find out how that is being started - perhaps from the [/etc/init.d](http://www.ghacks.net/2009/04/04/get-to-know-linux-the-etcinitd-directory/) directory?
John Topley