1
cd ~/mosesdecoder/sample-models
~/mosesdecoder/bin/moses -f phrase-model/moses.ini < phrase-model/in > out

I’m having an issue running this on the command line it gives me a permission denied error, is there anyway around it? I tried adding sudo in front but that didn't help, I'm a novice user trying to run a program on the command line and I tried doing it through the root level access but I am unable to locate this directory that way because it tries to do everything in the root directory.

6
  • you can do it with root by using cd / and then to your home directory .
    – Raja G
    Jun 21, 2012 at 16:15
  • 1
    Please edit your question and specify the exact error message after you run the command. Then we'll be able to help you better! :)
    – SirCharlo
    Jun 21, 2012 at 16:21
  • Probably the problem you are running into when you use sudo is that the shell is running moses as the superuser, but the redirects (< and >) are with your own privileges. I would login as the superuser with sudo -i and then cd ~YOURUSERNAME (so in my case, that would be cd ~zpletan).
    – zpletan
    Jun 21, 2012 at 16:27
  • Why should sudo be required when running from your own personal home directory? Is root somehow the owner of the directory it's in, or the "phrase-model" directory? Jun 21, 2012 at 17:02
  • Thank you all your suggestions helped me find my way to the solution. SirCharlo the actual error was Permission Denied so thats why I didn't copy paste it. The problem was that since I was logged in as root I was using the wrong syntax, removing the space after the '<' actually did the trick. Thank you all again.
    – Ferdinand
    Jun 21, 2012 at 17:27

1 Answer 1

2

Since I was running in root I was using ~ in my syntax and when in root that is not requires so I did it without any ~, and also removed a space after '<' and that did the job.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .