Hi there everyone, this might seem like a noob question but... I''ve got 2 servers: a web hosting server, and a database/storage server. I want to be able to manipulate the files on the storage server through my rails app (read/write etc) but they need to be secure so they can''t just be in a publicly accessible folder (access determined by the rails app). I don''t have much control of the servers themselves, so I don''t think I can just hook up a private LAN... it has to be done through the net. What''s the easiest way to do this? I''ve never really had to consider it before... Thanks! Jonathan. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jonzo wrote:> Hi there everyone, this might seem like a noob question but... > > I''ve got 2 servers: a web hosting server, and a database/storage > server. > > I want to be able to manipulate the files on the storage server > through my rails app (read/write etc) but they need to be secure so > they can''t just be in a publicly accessible folder (access determined > by the rails app). I don''t have much control of the servers > themselves, so I don''t think I can just hook up a private LAN... it > has to be done through the net. > > What''s the easiest way to do this? I''ve never really had to consider > it before... > > Thanks! > Jonathan.If the storage server has an SSH server, you could use Net::SSH. http://net-ssh.rubyforge.org/ -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks :-) i''ll take a look On Jan 10, 3:39 pm, Jeremy Weiskotten <rails-mailing-l...@andreas- s.net> wrote:> Jonzo wrote: > > Hi there everyone, this might seem like a noob question but... > > > I''ve got 2 servers: a web hosting server, and a database/storage > > server. > > > I want to be able to manipulate the files on the storage server > > through my rails app (read/write etc) but they need to be secure so > > they can''t just be in a publicly accessible folder (access determined > > by the rails app). I don''t have much control of the servers > > themselves, so I don''t think I can just hook up a private LAN... it > > has to be done through the net. > > > What''s the easiest way to do this? I''ve never really had to consider > > it before... > > > Thanks! > > Jonathan. > > If the storage server has an SSH server, you could use Net::SSH. > > http://net-ssh.rubyforge.org/ > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi I had a look at that, and to be honest, I''m not too familiar with how to share files over ssh... sftp maybe... Maybe I''m a bit delusional, but I''m thinking this must be a more common problem with a more documented solution surely? I''ve seen people talking about hosting rails on multiple ec2 instances a lot, how do people share uploaded images between web-server instances? am I missing something? Jonathan. On Jan 10, 3:41 pm, Jonzo <j.fant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks :-) i''ll take a look > > On Jan 10, 3:39 pm, Jeremy Weiskotten <rails-mailing-l...@andreas- > > s.net> wrote: > > Jonzo wrote: > > > Hi there everyone, this might seem like a noob question but... > > > > I''ve got 2 servers: a web hosting server, and a database/storage > > > server. > > > > I want to be able to manipulate the files on the storage server > > > through my rails app (read/write etc) but they need to be secure so > > > they can''t just be in a publicly accessible folder (access determined > > > by the rails app). I don''t have much control of the servers > > > themselves, so I don''t think I can just hook up a private LAN... it > > > has to be done through the net. > > > > What''s the easiest way to do this? I''ve never really had to consider > > > it before... > > > > Thanks! > > > Jonathan. > > > If the storage server has an SSH server, you could use Net::SSH. > > >http://net-ssh.rubyforge.org/ > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, There isn''t a magic ''share files'' button to find. You need some way to do it, as Jeremy mentioned one way to do it is with ssh between the servers. From what you say, (accessing uploaded images?) what you want is a network file system, like for example NFS (there are dozens of different ones all with pros and cons - like NFS traditionally causes big problems when trying to write to the same file from multiple places since it''s locking isn''t too good, though is always getting better). That way, you can set up the filesystem from the ''server'' machine which can be mounted by the ''client''. So accessing shared files is essentially going to a specific directory on the client (where the file system is mounted). Then you need to look at other things, like if you don''t have a private/internal network then you need some iptables rules to only allow your client to talk to the network filesystem (to stop nasty people doing naughty things to it :). Probably some network filesystem research will get you where you want to go. Good luck, HTH. Malcolm. On Jan 10, 2008 4:13 PM, Jonzo <j.fantham-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi I had a look at that, and to be honest, I''m not too familiar with > how to share files over ssh... sftp maybe... > > Maybe I''m a bit delusional, but I''m thinking this must be a more > common problem with a more documented solution surely? > > I''ve seen people talking about hosting rails on multiple ec2 instances > a lot, how do people share uploaded images between web-server > instances? am I missing something? > > Jonathan. > > > On Jan 10, 3:41 pm, Jonzo <j.fant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Thanks :-) i''ll take a look > > > > On Jan 10, 3:39 pm, Jeremy Weiskotten <rails-mailing-l...@andreas- > > > > s.net> wrote: > > > Jonzo wrote: > > > > Hi there everyone, this might seem like a noob question but... > > > > > > I''ve got 2 servers: a web hosting server, and a database/storage > > > > server. > > > > > > I want to be able to manipulate the files on the storage server > > > > through my rails app (read/write etc) but they need to be secure so > > > > they can''t just be in a publicly accessible folder (access determined > > > > by the rails app). I don''t have much control of the servers > > > > themselves, so I don''t think I can just hook up a private LAN... it > > > > has to be done through the net. > > > > > > What''s the easiest way to do this? I''ve never really had to consider > > > > it before... > > > > > > Thanks! > > > > Jonathan. > > > > > If the storage server has an SSH server, you could use Net::SSH. > > > > >http://net-ssh.rubyforge.org/ > > > -- > > > Posted viahttp://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jonzo wrote:> Hi I had a look at that, and to be honest, I''m not too familiar with > how to share files over ssh... sftp maybe... > > Maybe I''m a bit delusional, but I''m thinking this must be a more > common problem with a more documented solution surely? > > I''ve seen people talking about hosting rails on multiple ec2 instances > a lot, how do people share uploaded images between web-server > instances? am I missing something? > > Jonathan.Well, you could use S3. Maybe that''s what you''re talking about. EC2 is a compute cloud. S3 is the Amazon Simple Storage Service. You could use that -- I think it''s secure. There is a Ruby API for it. http://www.amazon.com/gp/browse.html?node=16427261 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for that! I think you''re completely right about the network file system. I''ve read about them before but I didn''t think of it at all. Thanks heaps everyone! On Jan 10, 5:08 pm, "Malcolm Lockyer" <maxpeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > There isn''t a magic ''share files'' button to find. You need some way to > do it, as Jeremy mentioned one way to do it is with ssh between the > servers. > > From what you say, (accessing uploaded images?) what you want is a > network file system, like for example NFS (there are dozens of > different ones all with pros and cons - like NFS traditionally causes > big problems when trying to write to the same file from multiple > places since it''s locking isn''t too good, though is always getting > better). > > That way, you can set up the filesystem from the ''server'' machine > which can be mounted by the ''client''. So accessing shared files is > essentially going to a specific directory on the client (where the > file system is mounted). > > Then you need to look at other things, like if you don''t have a > private/internal network then you need some iptables rules to only > allow your client to talk to the network filesystem (to stop nasty > people doing naughty things to it :). > > Probably some network filesystem research will get you where you want to go. > > Good luck, HTH. > > Malcolm. > > On Jan 10, 2008 4:13 PM, Jonzo <j.fant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi I had a look at that, and to be honest, I''m not too familiar with > > how to share files over ssh... sftp maybe... > > > Maybe I''m a bit delusional, but I''m thinking this must be a more > > common problem with a more documented solution surely? > > > I''ve seen people talking about hosting rails on multiple ec2 instances > > a lot, how do people share uploaded images between web-server > > instances? am I missing something? > > > Jonathan. > > > On Jan 10, 3:41 pm, Jonzo <j.fant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Thanks :-) i''ll take a look > > > > On Jan 10, 3:39 pm, Jeremy Weiskotten <rails-mailing-l...@andreas- > > > > s.net> wrote: > > > > Jonzo wrote: > > > > > Hi there everyone, this might seem like a noob question but... > > > > > > I''ve got 2 servers: a web hosting server, and a database/storage > > > > > server. > > > > > > I want to be able to manipulate the files on the storage server > > > > > through my rails app (read/write etc) but they need to be secure so > > > > > they can''t just be in a publicly accessible folder (access determined > > > > > by the rails app). I don''t have much control of the servers > > > > > themselves, so I don''t think I can just hook up a private LAN... it > > > > > has to be done through the net. > > > > > > What''s the easiest way to do this? I''ve never really had to consider > > > > > it before... > > > > > > Thanks! > > > > > Jonathan. > > > > > If the storage server has an SSH server, you could use Net::SSH. > > > > >http://net-ssh.rubyforge.org/ > > > > -- > > > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Another possibility could be to setup a VPN I guess, what''s the general opinion out there about this option? On Jan 10, 5:11 pm, Jonzo <j.fant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for that! I think you''re completely right about the network > file system. I''ve read about them before but I didn''t think of it at > all. Thanks heaps everyone! > > On Jan 10, 5:08 pm, "Malcolm Lockyer" <maxpeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > There isn''t a magic ''share files'' button to find. You need some way to > > do it, as Jeremy mentioned one way to do it is with ssh between the > > servers. > > > From what you say, (accessing uploaded images?) what you want is a > > network file system, like for example NFS (there are dozens of > > different ones all with pros and cons - like NFS traditionally causes > > big problems when trying to write to the same file from multiple > > places since it''s locking isn''t too good, though is always getting > > better). > > > That way, you can set up the filesystem from the ''server'' machine > > which can be mounted by the ''client''. So accessing shared files is > > essentially going to a specific directory on the client (where the > > file system is mounted). > > > Then you need to look at other things, like if you don''t have a > > private/internal network then you need some iptables rules to only > > allow your client to talk to the network filesystem (to stop nasty > > people doing naughty things to it :). > > > Probably some network filesystem research will get you where you want to go. > > > Good luck, HTH. > > > Malcolm. > > > On Jan 10, 2008 4:13 PM, Jonzo <j.fant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi I had a look at that, and to be honest, I''m not too familiar with > > > how to share files over ssh... sftp maybe... > > > > Maybe I''m a bit delusional, but I''m thinking this must be a more > > > common problem with a more documented solution surely? > > > > I''ve seen people talking about hosting rails on multiple ec2 instances > > > a lot, how do people share uploaded images between web-server > > > instances? am I missing something? > > > > Jonathan. > > > > On Jan 10, 3:41 pm, Jonzo <j.fant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Thanks :-) i''ll take a look > > > > > On Jan 10, 3:39 pm, Jeremy Weiskotten <rails-mailing-l...@andreas- > > > > > s.net> wrote: > > > > > Jonzo wrote: > > > > > > Hi there everyone, this might seem like a noob question but... > > > > > > > I''ve got 2 servers: a web hosting server, and a database/storage > > > > > > server. > > > > > > > I want to be able to manipulate the files on the storage server > > > > > > through my rails app (read/write etc) but they need to be secure so > > > > > > they can''t just be in a publicly accessible folder (access determined > > > > > > by the rails app). I don''t have much control of the servers > > > > > > themselves, so I don''t think I can just hook up a private LAN... it > > > > > > has to be done through the net. > > > > > > > What''s the easiest way to do this? I''ve never really had to consider > > > > > > it before... > > > > > > > Thanks! > > > > > > Jonathan. > > > > > > If the storage server has an SSH server, you could use Net::SSH. > > > > > >http://net-ssh.rubyforge.org/ > > > > > -- > > > > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---