We need to document the various ways to install modules using apps. Specifically via writable sites directory, ftp and ssh.

Apps uses the same mechanism for installing modules as the update module in core. This depends on certain php extensions to be installed on your server. Below is the documentation for the various methods of installing.

Install via FTP

In order to install via ftp, you must have the ftp php extension enabled. Most apache2/php installs have this by default which is by it probably shows up on most installs. You may run into a server that doesn't have ftp so then you will need to install it or use an alternative method. See http://us2.php.net/manual/en/book.ftp.php for how to install the ftp php extension. You will also need an ftp username and password that has rights to write to your site directory on your server.

Install via SSH

This is the recommended method of install
In order to install via ssh, you must have the ssh2 php extension installed and enabled. This does not come by default with many apache2/php installs so it commonly needs to be added. See http://us2.php.net/manual/en/book.ssh2.php for how to install the ssh2 php extensionw. You will also need a username and password of a user that can ssh into the server and has write permissions to your site directory on your server.

Install directly to sites directory

This is not the preferred method of install and should only be used as a last resort.
In order to install directly to the sites directory it needs to be writable. In order to do this go to the root of your drupal install and type sudo chmod -R 777 sites. Be aware that there are serious security issues with leaving your site in this state.

Comments

randallknutson’s picture

Issue summary: View changes

changing em to b

febbraro’s picture

Status: Active » Fixed

Thanks for this Randall. Added to the new README.

http://drupalcode.org/project/apps.git/commitdiff/fef0803?hp=d440bc6f662...

gh2012’s picture

What about drush ?

febbraro’s picture

What about drush?

gh2012’s picture

I really don't want to add ssh to the php stack. I don't need that. I run ssh from the shell.

randallknutson’s picture

I don't think we are understanding what your question is. If you don't want to install with SSH, don't.

Apps uses the same mechanism for installation as the Update module that comes with Drupal Core. This is just documenting the way to enable the different ways to make sure you set your server up properly to use apps.

gh2012’s picture

Ok. Thanks. That's a sufficient explanation.

I'm a bit new to Drupal and I haven't tried 'update' yet either. I am a bit wary of running opaque procedures so I tend to need some time to read through the code.

AaronBauman’s picture

Status: Fixed » Needs work

My sites directory is a+rwx, but the "write directly" method does not seem to be available.
After going through the batch process to download the app, I'm presented only with the FTP option to complete installation (which also doesn't work).

Can anyone expand on the documentation above?

randallknutson’s picture

Make sure that you do chmod -R 777 sites

The -R is very important.

AaronBauman’s picture

Status: Needs work » Fixed

Yes, thanks, missed the "-R".
If sites/* and subdirectories are writable, then "write directly" is used by default, and the credentials step skipped entirely.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drdave17’s picture

I have enabled Navin 7.x-1.0-beta1 (default theme) and I also have Omega 7.x-3.1 not enabled. Is this the correct way to use the Navin Sub-Theme? If so do I make my custom changes directly in the profiles/openenterprise/themes/navin/css?

If incorrect can someone tell me how to set this up?

Thanks

shaneforsythe’s picture

Apps uses the same mechanism for installation as the Update module that comes with Drupal Core.

The point being, that if you do not want to use the Update module on drupal core, you have options. You can ssh in, manually download modules/templates, or use what has become the predominantly favored method ... Drush.

At this point, if you want to use an app that comes with a kickstart distribution but do not have ftp enabled , you can't use it...there is no other option.

bnordgren’s picture

Make sure that you do chmod -R 777 sites

I spent the morning installing openenterprise over and over again. It would always get to the Install Apps phase, then fail with the message that there were no file transfer methods. Before beginning the install, I performed the above "chmod -R..." command (including the -R).

Being a newbie, I did not realize that the install process un-sets write permissions at the end of the Install Profile phase. So to all you other newbies, make sure to do the chmod -R 777 AGAIN, right before you Install Apps. This seems to work.

droopy_pal’s picture

Priority: Normal » Major
Status: Closed (fixed) » Active

Uh, I take issue with the notion that you're a "newbie" for expecting install software to actually install.

Since the direct-to-sites permissions issue has existed for over six months now and is used by all cloud-based installs (e.g. pantheon & webenabled) I wish it could be at least be acknowledged as a very serious problem.

fizk’s picture

The need to fix directory permissions comes from the apps module, and a fix was committed on August 15, 2012:

http://drupalcode.org/project/apps.git/commitdiff/d43a25c4dce3a329782a51...

For OpenEnterprise users, I would not recommend upgrading the apps module to 7.x-1.0-beta7 yet because it produced some errors about duplicate images.

fizk’s picture

Can anyone explain why chmod 755 sites/default works for me but chmod -R 777 sites is the documented last resort?

chmod 755 sites/default is much better than chmod -R 777 sites

febbraro’s picture

Status: Active » Fixed

The preferred mechanism for direct to filesystem installs has changed. The current mechanism is now to chmod 777 (or chown to the appropriate web server user) the sites/all/modules and the sites/all/libraries directories. Notice the lack of the -R flag, it need not do this for everything in these directories, just the parent directory so it can copy files over. This is now documented in the README as well as the config verify page.

http://drupalcode.org/project/apps.git/blob/refs/heads/7.x-1.x:/README.txt

We don't recommend this installation mechanism in your production environment, but it will work.

fizk’s picture

febbraro, chmod 777 is too permissive - chmod 755 sites/default is enough, as long as the web server user owns the directory.

febbraro’s picture

@fizk, sites/default is not where is puts the modules, sites/all is, so it needs permissions there.

Also in most cases the web server is different than the user that owns the files. See: http://drupal.org/node/244924

The server file system should be configured so that the webserver (e.g. Apache) does not have permission to edit or write the files which it then executes. That is, all of your files should be 'read only' for the Apache process, and owned with write permissions by a separate user.

That said opening it up to everyone (777) is just a bad practice in general, that is why it is not the recommended approach.

cliveroux’s picture

Title: Document different ways to install » Install not working

Hi. I have a new version of Drupal 7.15 installed. worked first time. I created a sites/all/modules folder, downloaded Open Enterprise 7.x-1.0-rc3 to the folder. I checked that my FTP PHP Extensions are enabled and the upload went well. However, there is no App tab in my admin bar, no sign of the app or any modules on the Module tabs page.

Now what? How do I get this thing working please can you help? Where or how do I enable this thing? I am non tech.

Clive

randallknutson’s picture

Title: Install not working » Document different ways to install

Please don't hijack this discussion with your own issue. Open a new issue if you are having trouble.

theconcretelink’s picture

I am brand new to Drupal and web design and I would like to install open enterprise. I have tried with no luck. I did read several posts but still am having trouble. Can you give me step by step (in layman's terms) instructions. Any help would be greatly appreciated.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sqlwebpedia’s picture

To fix the duplicate image errors with 1.0 beta7, I changed the UID index on file_managed table to be an index instead of UNIQUE index and that fixed my issue and could open the Apps management page. It seems to me this index is worthless as I have 0 and 1 for values.

I also left my Sites folders as 755 as you mentioned that was an issue with the apps module.

DB stuff I know. Drupal is a struggle to get working for a DB guy on shared hosting...

sqlwebpedia’s picture

Issue summary: View changes

wording cleanup

kholmes123’s picture

Title: Document different ways to install » can't install apps - undefined index
Priority: Major » Normal
Status: Closed (fixed) » Active

kholmes123’s picture

Title: can't install apps - undefined index » Document different ways to install

Hello
i followed the documented instructions for installing OE on top of the Acquia Dev Desktop for localhost operation but wonder if there is something missing from the instructions. But when i get to the app installation, I get all errors about an undefined index. I am running the Acquia Dev Desktop on a Win 7 laptop. I didn't see any obvious steps that I missed. Subsequent attempts to go back and install apps lead to similar error messages. Any suggestions on missing steps? I am not a Drupal or OS expert

Notice: Undefined index: last-modified in apps_retrieve_app_image() (line 259 of C:\DrupalOpenEnterprise\openenterprise-7.x-1.0-rc3\profiles\openenterprise\modules\apps\apps.manifest.inc).
Notice: Undefined index: last-modified in apps_retrieve_app_image() (line 259 of C:\DrupalOpenEnterprise\openenterprise-7.x-1.0-rc3\profiles\openenterprise\modules\apps\apps.manifest.inc).

Congratulations, you installed OpenEnterprise!

By not installing any apps, your site is currently a blank.

Francewhoa’s picture

Related to the "Install via SSH", here is the easiest option that I know of to install ssh2 extension package on Debian Jessie 8 at https://www.drupal.org/node/2620642

We tested with Apps module 7.x-1.0. Confirming it worked.

That documentation is for Panopoly distribution. Feel free to re-use and adapt if needed.