PuTTY No such file or directory

OK, I have been trying to setup a custom php.ini through putty, but I am having issues.
maybe I am not set up correct, maybe I am. anyways…

I have been following this wiki article: http://wiki.dreamhost.com/PHP.ini,
and when I get to the point of the article where it says:
Prepare for script execution, and I run this line In the shell:
chmod +x php-copy.sh

I get this error:
chmod: cannot access `php-copy.sh’: No such file or directory

I have the file saved here:

Could It be that I saved it in the wrong spot?

Thanks For all the help!


The second tzfiles.com directory is redundant. It should be in /home/USER/tzfiles.com/cgi-bin/

Actually, the wiki states that it should be in your home directory, which would just be /home/USER/php-copy.sh

And you can always use fullpath for shell commands:
chmod +x ~/php-copy.sh


not if you look at it in an ftp window (windows)

anyways I moved it to the root dir:

I also tried the full path commands, and it didn’t work either.


[quote]not if you look at it in an ftp window (windows) … anyways I moved it to the root dir:
/home/USER/php-copy.sh … I also tried the full path commands, and it didn’t work either.[/quote]
If you do not understand how and/or why this process works, hacking about with it by moving things around is only going to pretty much guarantee that it won’t work.

If you want it to work, I suggest you :

  1. Start over

  2. Follow the instructions precisely to the letter (including what goes where in the directory structure).

If you follow the instructions correctly, it will work as advertised.

If you want to configure it differently, that can work too, but only if you actually understand what you are doing, what has to go where, why you put things in various locations, and how to construct the appropriate commands in the shell.

Unless you do understand, or can learn enough to understand, those things, you are most likely to get it to work by following the instructions in the Wiki exactly.


Why when I do this:


it says:
-bash: /home/ryanssh/: is a directory

but if I do this:

it says this:
-bash: /home/ryanssh/tzfiles.com: No such file or directory



When you do what? It looks as though those responses are the result of some command that you did not have in your post.

Again: Your best chance of getting this to work is to just return your directories back to the way they were before you started, read and re-read the instructions until you understand exactly what to do in each step, and then follow the instructions one step at a time.

There are many, many threads in these forums about this subject, and I can’t believe that every possible way this can be screwed up has not already been discussed. You may find some information that will help you understand what you are doing if your review some of those discussions.

In every case, the end result has been the same : follow the instructions precisely and it will work.

If you start over (from the very beginning) and post back with the exact circumstance (details of what files are where, what you type at the command line, what directory you are in when you typed it, etc.), someone can likely help you with it - but I can’t make enough sense out of where you are in the process and what you have where to try to figure it out from the information you have given.


I firgured it out… almost.

First off, I was using a user who didn’t have any access to the tzfiles.com directory.

the sh files now does what it is supposed to, except for this:

Can’t open /home/ryannaddy/tzfiles.com/cgi-bin/php.ini: No such file or directory.

Is it supposed to create a file or something? It did for php.cgi

File I am using btw:

rsync -a /dh/cgi-system/php5.cgi “$CGIFILE”


#cp /etc/php5/cgi/php.ini “$INIFILE”

perl -p -i -e ‘
s/.post_max_size./post_max_size = 100M/;
s/.upload_max_filesize./upload_max_filesize = 100M/;


You need to actually change to the directory that file is in.
You do that by using the “cd” command, which stands for “Change Directory”.

So let’s say you’re in ~/ which also means the root of your home directory (ie. /home/username). You need to change to whatever directory you created the php-copy.sh file in, like this: cd ~/mywebsite.com/

If you aren’t sure where you are, you can type “pwd” (Present Working Directory), which will show you which directory you’re in. If you want to make sure the php-copy.sh file is in the directory you’re currently inside, type “ls” (list) and it’ll give you a listing of the directory’s contents that you’re in.

Good Luck.

Chips N Cheese - Custom PHP installs and the like!


Im sorry for everything…

Now time to test it!


Hooray for Mousee! I just knew you could help get this sorted. :wink: