Hmm, right. That's not ideal. Although it should me all working correctly if *everything* is root. So that's a little confusing.
Ideally, you want to deploy as the user that the site belongs to. So in this case, perhaps the francky user. Others may suggest www-data or whatever apache/nginx expect by default. It's really up to you, though. As long as everything is consistent :) -- Pat On 05/11/2010, at 4:21 PM, R Francky wrote: > Hi Pat > > your command returned that > > bliper:/# ls -al /home/francky/ruby_apps/bliper > total 68 > drwxrwxrwx 13 root root 4096 Aug 17 11:27 . > drwxr-xr-x 3 root root 4096 Aug 17 11:27 .. > -rw-rw-rwx 1 root root 10011 Aug 17 11:27 README > -rw-rw-rwx 1 root root 307 Aug 17 11:27 Rakefile > drwxrwxrwx 6 root root 4096 Aug 17 11:27 app > drwxrwxrwx 5 root root 4096 Nov 5 02:03 config > drwxrwxrwx 4 root root 4096 Oct 27 12:40 db > drwxrwxrwx 2 root root 4096 Aug 17 11:27 doc > drwxrwxrwx 3 root root 4096 Aug 18 16:22 lib > drwxrwxrwx 2 root root 4096 Nov 5 03:36 log > drwxrwxrwx 6 root root 4096 Aug 19 14:46 public > drwxrwxrwx 3 root root 4096 Aug 17 11:27 script > drwxrwxrwx 7 root root 4096 Aug 17 11:27 test > drwxrwxrwx 6 root root 4096 Nov 5 01:05 tmp > drwxrwxrwx 3 root root 4096 Aug 17 11:27 vendor > > everything's owned by root > > -- > > Francky > > On Nov 5, 8:18 am, Pat Allan <[email protected]> wrote: >> Hi Francky >> >> What's the output of the following: >> >> ls -al /home/francky/ruby_apps/bliper >> >> You really shouldn't need to run any of the rake tasks as root - but once >> you've started down that path, it gets fiddly to switch things back around, >> which is probably what we're running into at the moment. >> >> -- >> Pat >> >> On 05/11/2010, at 4:10 PM, R Francky wrote: >> >>> Hi Pat, >> >>> Here was I found there >> >>> /home/francky/ruby_apps/bliper/log# stat searchd.log >>> File: `searchd.log' >>> Size: 2117 Blocks: 8 IO Block: 4096 regular >>> file >>> Device: 88h/136d Inode: 175739305 Links: 1 >>> Access: (0601/-rw------x) Uid: ( 0/ root) Gid: ( 0/ >>> root) >>> Access: 2010-11-05 06:03:22.000000000 +0100 >>> Modify: 2010-11-05 03:48:02.000000000 +0100 >>> Change: 2010-11-05 03:48:02.000000000 +0100 >> >>> and the content is (last lines) >> >>> [Fri Nov 5 02:11:00.059 2010] [25758] caught SIGTERM, shutting down >>> [Fri Nov 5 02:11:00.060 2010] [25758] shutdown complete >>> [Fri Nov 5 02:11:00.235 2010] [23881] accepting connections >>> [Fri Nov 5 03:30:51.434 2010] [23881] caught SIGTERM, shutting down >>> [Fri Nov 5 03:30:51.434 2010] [23881] shutdown complete >>> [Fri Nov 5 03:48:02.964 2010] [29998] accepting connections >> >>> About application dir ownership, it seems that home/francky/ruby_apps/ >>> bliper is owned by root and not by francky >> >>> bliper:/home/francky/ruby_apps# stat bliper >>> File: `bliper' >>> Size: 4096 Blocks: 8 IO Block: 4096 directory >>> Device: 88h/136d Inode: 175737750 Links: 13 >>> Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ >>> root) >>> Access: 2010-11-05 03:48:02.000000000 +0100 >>> Modify: 2010-08-17 11:27:00.000000000 +0200 >>> Change: 2010-08-18 16:58:40.000000000 +0200 >>> bliper:/home/francky/ruby_apps# >>> bliper:/home/francky/ruby_apps# >>> bliper:/home/francky/ruby_apps# >> >>> so to start the search daemon, I used sudo and the whole issue >>> persist, I'm a little confused about that >> >>> -- >> >>> Francky >> >>> On Nov 5, 7:59 am, Pat Allan <[email protected]> wrote: >>>> What's in /home/francky/ruby_apps/bliper/log/searchd.log? >> >>>> -- >>>> Pat >> >>>> On 05/11/2010, at 1:42 PM, R Francky wrote: >> >>>>> Hi, >> >>>>> A last question please, when I try to execute rake ts:rebuild or >>>>> ts:start as the web user I get the following error: >> >>>>> Failed to start searchd daemon. Check /home/francky/ruby_apps/bliper/ >>>>> log/searchd.log. >> >>>>> So what did I miss ? >> >>>>> Cheers >> >>>>> Francky >> >>>>> On Nov 5, 5:18 am, R Francky <[email protected]> wrote: >>>>>> Here I checked the app directory >> >>>>>> bliper:/# stat /home/francky/ruby_apps/bliper >>>>>> File: `/home/francky/ruby_apps/bliper' >>>>>> Size: 4096 Blocks: 8 IO Block: 4096 directory >>>>>> Device: 88h/136d Inode: 175737750 Links: 13 >>>>>> Sure I'll do that, >> >>>>>> Thanks a lot for your help ! >> >>>>>> On Nov 5, 4:36 am, Pat Allan <[email protected]> wrote: >> >>>>>>> Yes, you should be running all rake tasks as francky. You'll want to >>>>>>> stop Sphinx as root, delete the existing index files (default is >>>>>>> db/sphinx/production) (again, as root), and then run rake ts:rebuild as >>>>>>> francky. >> >>>>>>> Cheers >> >>>>>>> -- >>>>>>> Pat >> >>>>>>> On 05/11/2010, at 12:33 PM, R Francky wrote: >> >>>>>>>> I'm running my rake tasks as root and the rails app is on /home/ >>>>>>>> francky/ruby_apps/ where "francky" is the user, so should I log in as >>>>>>>> this user and reexecute rake tasks (stop | config | index | start) ? >> >>>>>>>> On Nov 5, 4:28 am, Pat Allan <[email protected]> wrote: >>>>>>>>> Hi there >> >>>>>>>>> This really sounds like a permissions problem - which user are you >>>>>>>>> deploying/running-the-rake-tasks as? And which user owns the rails >>>>>>>>> app on the server? >> >>>>>>>>> -- >>>>>>>>> Pat >> >>>>>>>>> On 05/11/2010, at 12:22 PM, R Francky wrote: >> >>>>>>>>>> Hi all, >> >>>>>>>>>> I'm just deploying my app on production under debian linux after >>>>>>>>>> developing it under windows. >>>>>>>>>> In development, everything worked fine. >> >>>>>>>>>> In my model: >> >>>>>>>>>> define_index do >>>>>>>>>> indexes :title >>>>>>>>>> indexes :content >> >>>>>>>>>> has country_id, :type => :integer >>>>>>>>>> has created_at, :type => :datetime >>>>>>>>>> has updated_at, :type => :datetime >> >>>>>>>>>> set_property :delta => true >>>>>>>>>> set_property :field_weights => { >>>>>>>>>> :title => 10, >>>>>>>>>> :content => 6 >>>>>>>>>> } >>>>>>>>>> end >> >>>>>>>>>> And in my sphinx.yml >> >>>>>>>>>> development: >>>>>>>>>> morphology: stem_en >>>>>>>>>> min_infix_len: 3 >>>>>>>>>> enable_star: true >> >>>>>>>>>> production: >>>>>>>>>> bin_path: '/usr/local/bin' >>>>>>>>>> morphology: stem_en >>>>>>>>>> min_infix_len: 3 >>>>>>>>>> enable_star: true >> >>>>>>>>>> test: >>>>>>>>>> morphology: stem_en >>>>>>>>>> min_infix_len: 3 >>>>>>>>>> enable_star: true >> >>>>>>>>>> Things go wrong when I try to create new instance of my model in >>>>>>>>>> production environment, seems like DELTA doesn't work and raise this >>>>>>>>>> error: >> >>>>>>>>>> Errno::EACCES (Permission denied - >>>>>>>>>> /home/francky/ruby_apps/bliper/log/ >>>>>>>>>> searchd.production.pid): >>>>>>>>>> /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ >>>>>>>>>> thinking_sphinx.rb:210:in `read' >>>>>>>>>> /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ >>>>>>>>>> thinking_sphinx.rb:210:in `sphinx_pid' >>>>>>>>>> /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ >>>>>>>>>> thinking_sphinx.rb:205:in `sphinx_running_by_pid?' >>>>>>>>>> /usr/local/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.18/lib/ >>>>>>>>>> thinking_sphinx.rb:198:in `sphinx_running?' >> >>>>>>>>>> and new instance doesn't get indexed until I redo rake >>>>>>>>>> RAILS_ENV=production ts:rebuild whereas it should be indexed >>>>>>>>>> automatically like in development environment (production and >>>>>>>>>> development db schemas are exactly the same) >> >>>>>>>>>> I ever looked >>>>>>>>>> athttp://freelancing-god.github.com/ts/en/common_issues.html#deltas >>>>>>>>>> but I don't really know how to fix this issue, as I'm a *nix >>>>>>>>>> beginner. >> >>>>>>>>>> Please help me >> >>>>>>>>>> Thanks for your support ! >> >>>>>>>>>> -- >>>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>>> Groups "Thinking Sphinx" group. >>>>>>>>>> To post to this group, send email to >>>>>>>>>> [email protected]. >>>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>>> [email protected]. >>>>>>>>>> For more options, visit this group >>>>>>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Thinking Sphinx" group. >>>>>>>> To post to this group, send email to [email protected]. >>>>>>>> To unsubscribe from this group, send email to >>>>>>>> [email protected]. >>>>>>>> For more options, visit this group >>>>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >> >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "Thinking Sphinx" group. >>>>> To post to this group, send email to [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]. >>>>> For more options, visit this group >>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Thinking Sphinx" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group >>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
