Shell Access

This subject seems to be divided between those who know and those who do not. Those who know, love typing answers back to these sort of questions, with lots of funny weird symbols and letters and all sorts of other weird and wonderfull ‘commands’. That to those who do not know, well… still don’t know.

I need a very simply straight foward answer to a simple and straightfoward question;

This is what I want to do;

Change the php file upload limit on my php.ini file.

This is the question:
How do I do that?

Here’s the problem;

NOTHING in the DreamWIKI works, not one thing, not one programm, I spent hours and hours on their to finally log in and have the system tell me that;


OK, after going for a long walk and trying to figure out why anyone would take the time and effort to make a WIKI for this, if at the end of it all, DreamHost only allow you shell acess so you can read you are not allowed .ssh access, i decided to go for another long walk.

There is NO INFORMATION ANYWERE on DreamHost in relation to this, this is yet another host, that concluded that the php file upload size is the single most important account detail the customer SHOULD NOT KNOW about.

To put simply;

What is SHELL ACESS and how does it work, were do i get logged in… Is this FTP only or do i need something else…

My god this is the most frustrating thing i have ever come across…

Can somebody please make a SIMPLE Point & Click FAQ… on how to SHELL access your DreamHost account. Can someone tell me they actually do it and that they have actually changed their php.ini and it works.

You need to enable it for your user:

  1. Log into to manage your user(s).
  2. In the right column, click on Edit.
  3. Click the Shell checkbox to Enable ssh/telnet.
  4. Click the Save Changes button.
  5. Wait a bit for the system to actually process your request.
  6. Use your ssh/telnet client to log into your account.


Thank you. That was the problem.

Now I’m following this WIKI here:

But when I get to step: “Prepare script for execution” I run into the following problems:

According to the WIKI, I first…

[pocky]$ chmod x

Then i have to call the new shell script to copy the php.cgi and php.ini files into the newly created cgi-bin directory. So I use the listed command:

[pocky]$ ./

But keep getting this error message:

cp: cannot create regular file /home/utra/': No such file or directory cp: cannot create regular file/home/utra/’: No such file or directory
Can’t open /home/utra/ No such file or directory.

So the WIKI suggest to convert it to proper Unix format before calling the script again:

[pocky]$ dos2unix

Then I run the first part again:

[pocky]$ ./

But keep getting these error messages:

cp: cannot create regular file /home/utra/': No such file or directory cp: cannot create regular file/home/utra/’: No such file or directory
Can’t open /home/utra/ No such file or directory.

Any suggestins as to what i’m doing wrong? This is very confusing and my knowledge is trully off n00by proportions…


Yeah i can not get it to copy over the files, keeps giving me those error messages…

Lost on this one… any help please? looks wrong. What Fully Hosted domain did you create?

Your website directory for CGIFILE and INIFILE should be: (whatever your domain is). When you log into your home directory, there should be some existing directories such as logs, Maildir and “”.

I’m hoping you already did the ‘mkdir cgi-bin’ in ~/


I have two fully hosted accounts on my DH account.

I only want to change the php.ini file size for the second domain. Althou it does not really matter if it also includeds the first domain.

So my structure looks like this, (were I made the cgi directory):


(I’m using the first instance in the ssh shell acess)

When you say: looks wrong

What should it look like? I just tried:


And I got the same errors.

I’m still a little confused as to what my domain would be for this shell access and if i can only effect the file changes to the domain. And if so, should i be logging into that domain with the Shell access or as I’m currently doing, login into the main account?

I just want to make this one single change, and it does not matter if it affects both domains, i just desperatly need it. My users have to upload files for peer review and under no circumstances do i want to set-up FTP accounts, as suggested in many other threads.

My users need to log into their account and immediatly be able to use my sites resources without having to load extra programms or clients or worry about log-in’s and folders and all that nonsense.

Thanks again for your patience.

Let’s pretend you don’t have a domain since you don’t want or need a custom PHP for that domain. is the machine where your site is hosted, and should not be used as a directory name for your domain. I sure hope you have a “” directory in your home directory. You should be logging in as the user who owns

Your should have this in it:

Fix your and then enter the following command:
mkdir $HOME/

Or create the cgi-bin folder in your directory using your FTP program.


Ok, excellent, it worked, i had all my directories mixed up.

One more question thou, when I’m setting up the cron job so the php file stays up to date, the command the WIKI gives me is:

@weekly /home/myusername/

Do I just enter that as it is, or do I need to change the ‘myusername’ to my actual username (Owner of

Thansk for all your help so far, it’s resolved my problems.


I just noticed that even thou the php.ini file now reflects the new file size, you can NOT upload files of that size. IPB (Invision Power Board) Download Manager, only shows the MAX file size as 7mb. I go to the Admin panel for IPB and set the MAX upload filesize to the new filesize in the php.ini, but it will not recognize it and I can only upload 7mb files.

Should I perhaps set this up on the domain as well?

Everything is installed to, so i don’t get why it will not allow the new filesize.

Maybe I have entered the new filesize incorrectly in the file;

s/.post_max_size./post_max_size = 70M/;
s/.upload_max_filesize./upload_max_filesize = 70M/;

Is that correct? Or should be in (kB) [71680]

IPB Gives me this message, when I try to change the upload size limit:

“The maximum upload file size you can specify is 7168. If you require larger file uploads, please contact your host to have this limit raised in your php.ini configuration file.”

Perhaps it’s reading the wrong file? Is there more then one location for the php.ini that needs to be modified?

Or maybe the new size is not allowed, is there a limit tthat DH sets as the maximun file size, even when running a custom php.ini?

Boy that’s alot of questions… sorry about this, just the information to do this procedure is so scattered.

You need to change the path to reflect your actual user name.

Did you follow the last step in the wiki guide and make the relevant changes to the .htaccess file, or create a .htaccess file if none exists? The .htaccess file needs to be placed in the root of the web accessable directory for that domain, by default this directory is named the same as the domain.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

As my name suggest; FRUSTRATED = Stoopid… =[

yes i forgot about the .htaccess file…


Everything seems to be working just fine now… 5 hours to get it right… this topic needs a proper “nooby-level” FAQ…

phewwww… what a marathon…

Again I thank you both for all your help, thanks to that help, my problem is now resolved.


Excellent, I am glad you got it all worked out.

Yep, In my experience, these type of things can indeed be frustrating at the time, but afterwards there is a sense of accomplishment and hopefully I learn a thing or two along the way :slight_smile:

You are more than welcome, but Scott provided most of the help.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

Came across this post while searching for a solution to my “problem” - hope someone can point me in the right direction. I have a site where users can upload images, problem is the max is 7MB. My users upload large-size images, 2-3MB per photo…so they can only do 2 or 3 pics at a time, which is time consuming and a pain in the rear. Did I read correctly that I can change something to increase my max_file_size to 70MB if I want??? If so, can someone give me some explanation on how I do this? Thanks!

You posted this in a thread where that explanation is given. What more do you need to know?


Sorry, I found where I need to edit the php.ini file afterwards, but in order to do that it seems I need make those changes from UNIX shell, which I’ve not done before. It doesn’t look complicated, but I’m reading the wiki post now and it says I should be able to view my current php.ini file from /etc/php/php.ini and I don’t even have a /etc/…directory in my account? I realize you probably don’t have time to deal with someone who is new at this stuff, but I do appreciate your response. Thanks

That’s ok…there is nothing wrong with asking questions if a particular part of the process is confusing; many of us on this forum are willing to help, but we have to know where to start, right? :wink:

You are correct that you need to edit the php.ini file, and you can do it from the Linux (“Linux Is Not UniX” :slight_smile: ) shell, but you do not have to. You can also download the file to your computer, edit there, and upload it back to Dreamhost. For many users, this is easier than coming to grips with a *nix editor. I don’t know what platform you are using (Mac, windoze, etc.), so I can’t specifically address that process, but just make sure that you use a “pure text” editor rather than a “wordprocessor”. Ideally, it should give you the option of saving the file with “*nix” style line endings, and you should do so. If you need an editor than can do this, there are many freely available on the web.

It may not seem to be “in your account”, but you do have access to it. It can be a little comfusing if you are not used to *nix file system organization. The “/etc/php/php.ini” is above your user account in the directory tree, and is shared by all users. This is why you can’t just edit it and go (your edit to that file would impact all users on your machine!) but have to, as described in the wiki article, copy that file into a place under your control (within your directory structure), edit that copy, and instruct the server to use your copy instead of the “common” one…that is what the wiki article is all about.

the php file is located at:
/etc/php/php.ini - and you can “view” it, from the shell, by typing:
cat /etc/php/php.ini follwed by “enter” or cat /etc/php/php.ini|less , followed by “enter”, to view it a page at a time using the “less” viewing utility (for help on using that, type less --help , followed by enter.

Your directory structure should look something like this:


*note that “/etc” and “/home” are at the same level of the directory tree! the “/” indicates the “top” level of the tree!

(If this doesn’t help you understand. you might want to take a break from this project and google abit for “linux directory structure”)

The wiki tells you to create a cgi-bin directory within your “web” directory, and when you do, it’s path will look like this:


The script in the wiki article first copies the php.cgi and the php.ini files from their “common” homes, then uses perl to modify certian aspects of the php.ini file.

Does this help at all?


Wow! Thanks for all this!! Yes, some of this made sense to me before - like I was able to create the cgi-bin dir and create the .sh file, what I’m not able to do is execute the file like the wiki tells me to…where do I type those commands? I know from the “shell” but how do I get there? I thought initailly that it was because my user wasn’t setup for ssh/shell access, so I changed it, waited for the change to take affect and logged on again thinking maybe since the logon said “shell” instead of “ftp” that it would take me somewhere different, but it didn’t. I also tried to go “up” above my home dir and still wasn’t able to see anything. It’s not being able to type commands that prevents me from performing the rest of this otherwise simple task. Can I do this from my regular FTP software instead of using DH?

Oh- almost forgot, using windows and always use notepad to edit my php and the like

It sounds as though you are only connecting to Dreamhost via FTP, as opposed to connecting as a shell user via ssh, telnet, etc. Depnding upon what FTP client you are using (whether or not it is using sftp), you will not be able to “traverse” directories above you user’s “home”.

While a sftp (secureftp) client will let you “see” other directories, you most likely won’t be able to “execute” programs from the ftp program. To do this you need to connect via ssh. Have you done that yet?


nope…are there instructions in the wiki for this? - thanks again.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

Yes, very good shell insturctions can be found from this page

Be sure to read the “SSH” and “Shell Commands” links - hopefully, this will get you set up to access the shell, from which you can “run” the “” script, and move around the directory structure.

Even if this stuff seems difficult and/or confusing, I strongly advise you to take the time now to get a handle on this; your life will become much easier administering websites if you learn the basics of using the shell :wink: .