From: Paul Date: 2008-02-21T07:37:22+09:00 Subject: Re: Permission denied when running Ruby script ------=_Part_2409_30495421.1203547045100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Missing execute permission for the user? Do a "chmod +x" on the script, should solve your problem. Cheers, Paul On Wed, Feb 20, 2008 at 10:31 PM, Tim Conner wrote: > I think that this question might be due to me lacking some fundamental > linux knowledge but please can someone explain to me what is going on > here. I have a ruby script that I would like to call via a cron job. I > have made the necessary adjustments to crontab but i can't get it to > work. I think that this is because the user is getting a 'permission > denied' message when i try and call the script directly, however, it > works when i call it with a ruby prefix: > e.g. > user@server:ruby test_script.rb > => script works > user@server:./test_server.rb > => -bash: ./test_server.rb: Permission denied > > The script starts with the shebang line: #!/usr/bin/env ruby > > On my development machine, I'm using cygwin and the script works when > called either way: > e.g. > user@dev:ruby test_script.rb > => script works > user@dev:./test_server.rb > => script works > > Please can someone explain why (on the server) I am getting the > permission denied message? The same user can successfully run the > script if they call it with the ruby prefix. > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_2409_30495421.1203547045100--