i have an archive of documents (word, excel, jpeg, png, gif...) residing on a network share that is accessed via send_file. when running mongrel on the command line the files are properly delivered. with mongrel running as a service they don''t. now normally i would think that should be fixable by configuring the service to run under a user that can read the files.... but i''ve already tried that without success. running the service as system or administrator or the user i''m using for development (the same user i run the mongrel on command line) does _NOT_ help. so i can''t figure out how to get this to work. development or production mode also doesn''t make a difference. from what i''ve seen so far this generally applies to any File IO access. could this be a bug in the mongrel service implementation?
David Vrensk
2007-Nov-07 14:48 UTC
[Mongrel] file access with mongrel running as windows service
On Nov 7, 2007 3:01 PM, gmail <neongrau at gmail.com> wrote:> i have an archive of documents (word, excel, jpeg, png, gif...) > residing on a network share that is accessed via send_file. > > when running mongrel on the command line the files are properly > delivered. > with mongrel running as a service they don''t.Try running "net use" inside the process to see if the network share is mounted at all. This sounds like the typical Windows/web problem where the operator assumes that everybody sees the same shares that she sees in her session. In reality, network shares are mounted per login session. Two users can be logged in on the the same Windows server and have different shares available on Z:, which is clever, but also sort of confusing. What is even more confusing is that you may be logged on as "user1" and have something mapped to Z:, but the service running as user1 has nothing on Z: ? it needs to create its own mappings. Let us know if this helps. /David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071107/4cedbca5/attachment-0001.html
yes that helped! i just needed to switch the drive letter with the UNC path :) thanks for pointing that out. years of using windows but never thought it worked that way Am 07.11.2007 um 15:48 schrieb David Vrensk:> On Nov 7, 2007 3:01 PM, gmail <neongrau at gmail.com> wrote: > i have an archive of documents (word, excel, jpeg, png, gif...) > residing on a network share that is accessed via send_file. > > when running mongrel on the command line the files are properly > delivered. > with mongrel running as a service they don''t. > > Try running "net use" inside the process to see if the network share > is mounted at all. This sounds like the typical Windows/web problem > where the operator assumes that everybody sees the same shares that > she sees in her session. In reality, network shares are mounted per > login session. Two users can be logged in on the the same Windows > server and have different shares available on Z:, which is clever, > but also sort of confusing. What is even more confusing is that you > may be logged on as "user1" and have something mapped to Z:, but the > service running as user1 has nothing on Z: ? it needs to create its > own mappings. > > Let us know if this helps. > > /David > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071107/6a949e1e/attachment.html
Ralf Vitasek
2007-Nov-07 15:21 UTC
[Mongrel] file access with mongrel running as windows service
sorry that wasn''t posted "anonymously" on purpose. i just set up my gmail account with imap in apple mail last night and didn''t even noticed it put gmail in the sender name. until i sent the reply. Am 07.11.2007 um 15:48 schrieb David Vrensk:> On Nov 7, 2007 3:01 PM, gmail <neongrau at gmail.com> wrote: > i have an archive of documents (word, excel, jpeg, png, gif...) > residing on a network share that is accessed via send_file. > > when running mongrel on the command line the files are properly > delivered. > with mongrel running as a service they don''t. > > Try running "net use" inside the process to see if the network share > is mounted at all. This sounds like the typical Windows/web problem > where the operator assumes that everybody sees the same shares that > she sees in her session. In reality, network shares are mounted per > login session. Two users can be logged in on the the same Windows > server and have different shares available on Z:, which is clever, > but also sort of confusing. What is even more confusing is that you > may be logged on as "user1" and have something mapped to Z:, but the > service running as user1 has nothing on Z: ? it needs to create its > own mappings. > > Let us know if this helps. > > /David > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071107/43fdd616/attachment.html
Ralf Vitasek
2007-Nov-07 15:22 UTC
[Mongrel] file access with mongrel running as windows service
yes that helped! i just needed to switch the drive letter with the UNC path :) thanks for pointing that out. years of using windows but never thought it worked that way Am 07.11.2007 um 15:48 schrieb David Vrensk:> On Nov 7, 2007 3:01 PM, gmail <neongrau at gmail.com> wrote: > i have an archive of documents (word, excel, jpeg, png, gif...) > residing on a network share that is accessed via send_file. > > when running mongrel on the command line the files are properly > delivered. > with mongrel running as a service they don''t. > > Try running "net use" inside the process to see if the network share > is mounted at all. This sounds like the typical Windows/web problem > where the operator assumes that everybody sees the same shares that > she sees in her session. In reality, network shares are mounted per > login session. Two users can be logged in on the the same Windows > server and have different shares available on Z:, which is clever, > but also sort of confusing. What is even more confusing is that you > may be logged on as "user1" and have something mapped to Z:, but the > service running as user1 has nothing on Z: ? it needs to create its > own mappings. > > Let us know if this helps. > > /David > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071107/b7183bab/attachment.html
Amit Tomar
2010-Aug-17 13:54 UTC
[Mongrel] file access with mongrel running as windows service
David Vrensk wrote:> On Nov 7, 2007 3:01 PM, gmail <neongrau at gmail.com> wrote: > >> i have an archive of documents (word, excel, jpeg, png, gif...) >> residing on a network share that is accessed via send_file. >> >> when running mongrel on the command line the files are properly >> delivered. >> with mongrel running as a service they don''t. > > > Try running "net use" inside the process to see if the network share is > mounted at all. This sounds like the typical Windows/web problem where > the > operator assumes that everybody sees the same shares that she sees in > her > session. In reality, network shares are mounted per login session. Two > users can be logged in on the the same Windows server and have different > shares available on Z:, which is clever, but also sort of confusing. > What > is even more confusing is that you may be logged on as "user1" and have > something mapped to Z:, but the service running as user1 has nothing on > Z: ? > it needs to create its own mappings. > > Let us know if this helps. > > /DavidDavid could you explain it more i think i have same sort of problem what i am doing is. i created a web application using instant rails,i having rails 2.2.2,mysql database,mongrel running as a server, i used mysql database to store the different property of files and i am plcing actual file(phsical file) on samba server.now i run my it as application ,everthing is fine but soon i run my application as windows service i am getting this problem No such file or directory - Z:/streams/Texture.bmp Z: is drive letter here i am trying to upload Texture.bmp file to samba means to Z:/streams any help .......... -- Posted via http://www.ruby-forum.com/.
Luis Lavena
2010-Aug-17 14:00 UTC
[Mongrel] file access with mongrel running as windows service
On Tue, Aug 17, 2010 at 10:54 AM, Amit Tomar <lists at ruby-forum.com> wrote:> > David could you explain it more i think i have same sort of problem > what i am doing is. > i created a web application using instant rails,i having rails > 2.2.2,mysql database,mongrel running as a server, > i used mysql database to store the different property of files and i am > plcing actual file(phsical file) on samba server.now i run my it as > application ,everthing is fine but soon i run my application as windows > service ?i am getting this problem > > No such file or directory - Z:/streams/Texture.bmp > Z: is drive letter > here i am trying to upload Texture.bmp file to samba means to Z:/streams > any help .......... >Unless you''re running the mongrel service as the same user, the mapped network drives are not available. Either you use the full network path (\\SERVER\PATH) or you run the service as the user that defines the mapped network drives. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Amit Tomar
2010-Aug-17 14:08 UTC
[Mongrel] file access with mongrel running as windows service
Luis Lavena wrote:> On Tue, Aug 17, 2010 at 10:54 AM, Amit Tomar <lists at ruby-forum.com> > wrote: >> No such file or directory - Z:/streams/Texture.bmp >> Z: is drive letter >> here i am trying to upload Texture.bmp file to samba means to Z:/streams >> any help .......... >> > > Unless you''re running the mongrel service as the same user, the mapped > network drives are not available. > > Either you use the full network path (\\SERVER\PATH) or you run the > service as the user that defines the mapped network drives. > -- > Luis Lavena > AREA 17 > - > Perfection in design is achieved not when there is nothing more to add, > but rather when there is nothing more to take away. > Antoine de Saint-Exup?Luis i tried to set full network path but not successed and how do i run the service under the user that defines the mapped network drives.> ---- Posted via http://www.ruby-forum.com/.
Luis Lavena
2010-Aug-17 14:18 UTC
[Mongrel] file access with mongrel running as windows service
On Tue, Aug 17, 2010 at 11:08 AM, Amit Tomar <lists at ruby-forum.com> wrote:> > Luis > i tried to set full network path > but not successed and how do i run the service under the user that > defines the mapped network drives.You will need to access the Services definition and under properties select Run as user. You will need to provide the password too. (all this under administrative tools, things may vary between windows versions). -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Amit Tomar
2010-Aug-17 15:08 UTC
[Mongrel] file access with mongrel running as windows service
Luis Lavena wrote:> On Tue, Aug 17, 2010 at 11:08 AM, Amit Tomar <lists at ruby-forum.com> > wrote: >> >> Luis >> i tried to set full network path >> but not successed and how do i run the service under the user that >> defines the mapped network drives. > > You will need to access the Services definition and under properties > select Run as user. You will need to provide the password too. (all > this under administrative tools, things may vary between windows > versions). > > -- > Luis Lavena > AREA 17 > - > Perfection in design is achieved not when there is nothing more to add, > but rather when there is nothing more to take away. > Antoine de Saint-Exup?r u saying i ahve to run my service under netwrok service and i would like to konw how i run my service under netwrok service?? -- Posted via http://www.ruby-forum.com/.
Luis Lavena
2010-Aug-17 15:19 UTC
[Mongrel] file access with mongrel running as windows service
On Tue, Aug 17, 2010 at 12:08 PM, Amit Tomar <lists at ruby-forum.com> wrote:> > r u saying i ahve to run my service under netwrok service and i would > like ?to konw how i run my service under netwrok service??No, I''m saying that you need to run your service under a user account that defines those mapped network drives. Since network mappings (Z:, W:, etc) are dependent of the user, needs to be run as that particular user. You need to change those settings for that particular service under the "Services" manager in Administrative Tools (control panel). -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Amit Tomar
2010-Aug-18 12:47 UTC
[Mongrel] file access with mongrel running as windows service
Luis Lavena wrote:> On Tue, Aug 17, 2010 at 12:08 PM, Amit Tomar <lists at ruby-forum.com> > wrote: >> >> r u saying i ahve to run my service under netwrok service and i would >> like ?to konw how i run my service under netwrok service?? > > No, I''m saying that you need to run your service under a user account > that defines those mapped network drives. Since network mappings (Z:, > W:, etc) are dependent of the user, needs to be run as that particular > user. > > You need to change those settings for that particular service under > the "Services" manager in Administrative Tools (control panel). > > -- > Luis Lavena > AREA 17 > - > Perfection in design is achieved not when there is nothing more to add, > but rather when there is nothing more to take away. > Antoine de Saint-Exup?LUIS i am not getting error like Permission denied - //Z/:streams/al00_96000.aac what should i do and i am also running service as a particular user -- Posted via http://www.ruby-forum.com/.
Luis Lavena
2010-Aug-18 17:02 UTC
[Mongrel] file access with mongrel running as windows service
On Wed, Aug 18, 2010 at 9:47 AM, Amit Tomar <lists at ruby-forum.com> wrote:> > LUIS > i am not getting error like > Permission denied - //Z/:streams/al00_96000.aac > what should i do and i am also running service as a particular userI''m having problems understanding your english. Mapped network drives do not start with //, they are normal network letters: C:\Users\Luis>net view Server Name Remark ------------------------------------------------------------------------------- \\KEORE C:\Users\Luis>net view \\KEORE Shared resources at \\KEORE Share name Type Used as Comment ------------------------------------------------------------------------------- Users Disk C:\Users\Luis>net use * \\KEORE\Users Drive Z: is now connected to \\KEORE\Users. The command completed successfully. C:\Users\Luis>irb irb(main):001:0> require ''fileutils'' => true irb(main):002:0> FileUtils.touch "Z://foo.txt" Errno::EACCES: Permission denied - Z://foo.txt from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `initialize'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `open'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `touch'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `each'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `touch'' from (irb):2 It is clear I don''t have permission to do that, but: irb(main):003:0> FileUtils.touch "Z://Luis/foo.txt" => ["Z://Luis/foo.txt"] I do. Also: irb(main):004:0> FileUtils.touch "//Z://Luis/bar.txt" Errno::ENOENT: No such file or directory - //Z://Luis/bar.txt from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `initialize'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `open'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `touch'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `each'' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `touch'' from (irb):4 it is clear that // should not prepend the drive letter, but instead: irb(main):005:0> FileUtils.touch "//KEORE/Users/Luis/bar.txt" => ["//KEORE/Users/Luis/bar.txt"] I hope this explains a bit better what I''m talking about. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Amit Tomar
2010-Aug-20 12:12 UTC
[Mongrel] file access with mongrel running as windows service
Thanks my friend... i am able to figure out my problem ... -- Posted via http://www.ruby-forum.com/.
Amit Tomar
2010-Aug-20 13:31 UTC
[Mongrel] file access with mongrel running as windows service
Luis I tried to upload a file of size 324mb but something strange happened i''m able to upload the file but still i''m getting error Invalid argument - //192.122.227.53/Smar/streams2/D1_monsters_3_720x480_422i_SP_5Mbps_30fps_657frames.yuv but when i checked the location(//192.122.227.53/Smar/streams2) file was there what could be the reason ?? -- Posted via http://www.ruby-forum.com/.
Luis Lavena
2010-Aug-20 14:16 UTC
[Mongrel] file access with mongrel running as windows service
On Fri, Aug 20, 2010 at 10:31 AM, Amit Tomar <lists at ruby-forum.com> wrote:> Luis I tried to upload a file of size 324mb but something strange > happened > i''m able to upload the file but still i''m getting error > ?Invalid argument - > //192.122.227.53/Smar/streams2/D1_monsters_3_720x480_422i_SP_5Mbps_30fps_657frames.yuv > but when i checked the location(//192.122.227.53/Smar/streams2) file was > there > what could be the reason ??I have no idea where are you receiving the ''invalid argument'' error. It is extrematelly important than when you report an error, provide enough details and precision about it, more precisely, the full error messages and backtraces. We can''t replicate or provide you help if you skim it and provide vague information. Help us help you. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Amit Tomar
2010-Aug-27 13:46 UTC
[Mongrel] file access with mongrel running as windows service
Luis Lavena wrote:> On Fri, Aug 20, 2010 at 10:31 AM, Amit Tomar <lists at ruby-forum.com> > wrote: >> Luis I tried to upload a file of size 324mb but something strange >> happened >> i''m able to upload the file but still i''m getting error >> ?Invalid argument - >> //192.122.227.53/Smar/streams2/D1_monsters_3_720x480_422i_SP_5Mbps_30fps_657frames.yuv >> but when i checked the location(//192.122.227.53/Smar/streams2) file was >> there >> what could be the reason ?? > > I have no idea where are you receiving the ''invalid argument'' error. > > It is extrematelly important than when you report an error, provide > enough details and precision about it, more precisely, the full error > messages and backtraces. > > We can''t replicate or provide you help if you skim it and provide > vague information. > > Help us help you. > -- > Luis Lavena > AREA 17 > - > Perfection in design is achieved not when there is nothing more to add, > but rather when there is nothing more to take away. > Antoine de Saint-Exup?i don''t know how to ask this question because am new to rails. but i want to know to is which part of code sumit_tag will take you means after execution of sumit_tag where control of programme goes?? -- Posted via http://www.ruby-forum.com/.