Beginner's manual?

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

Ok, this is a beginner's question and I know it's frustrating. I found this EC2 manual which helped me setup my Mercury AMI on EC2.
http://www.slideshare.net/aridavidow/moving-drupal-to-the-cloud

Now I'm succesfully running a 32bit Mercury 1.1 AMI on EC2. I've logged in with SSH and can install pressflow via the public URL. It works.

But now,... I want to upload my own files to /var/www...! :) This poses a problem, as I get authentication troubles.

I logged in with user "ubuntu" and my Amazon EC2 SSH Keypair (converted to Putty ppk). All fine. Loggin in with root shows the message "please login as user ubuntu". Ok.

But I can't create folders or upload files. Even with Putty/Tunnelier's command line window I can't "mkdir folder". I can't user CHMOD, or CHOWN either. I'm completely blocked out of my own cloud server :)

I'm reading the README.TXT, but all it discusses is the Mysql user.

What I am doing wrong? Thanks! I know this is a beginner's issue, but I'm learning a lot about Pantheon and want to eventually move all my sites to Pantheon. Looks very promising. I usually know how to handle a VPS or dedicated server, but this AMI just doesn't let me upload my files...

Comments

I figured it out, I

morningtime's picture

I figured it out, I did

  • "sudo passwd root", & changed the password
  • "su root" & logged in as root
  • then I chowned the www folders to "ubuntu www-data".

Now I'm able to upload files with filezilla or tunnelier.

Is this the correct approach? Or is this a security issue?

Easy, but wrong approach

aruna.kulatunga's picture

By enabling root, you open yourself to script-kiddie attacks. Much better approach is to prepend all your commands with sudo. One step beyond this, again not recommended because you can make unrecoverable mistakes as root, is to sudo su, which basically makes you root for the session.

Thanks for the help, I see

morningtime's picture

Thanks for the help, I see what to do know!

Ubuntu Lucid

Greg Coit's picture

Canonical made the decision to that the Ubuntu Lucid AMIs would only use the ubuntu user, not root (which matches their non-VPS version of Lucid server and desktop). And yes, sudo will allow the ubuntu user to do virtually anything root can do. However, most applications for uploading files are unable to use sudo. This is an issue you would face on virtually any version of Lucid (except for some VPSs who setup their own version of Lucid with root ssh enabled).

My suggestion is to create a folder in /home/ubuntu and use it as a staging area:

1) use your favorite GUI or CL ssh app to upload the file to, say, /home/ubuntu/staging

2) ssh into the server and use sudo to move the files from /home/ubuntu/staging to /var/www or wherever you want then to be.

Hope this helps,

Greg

--
Greg Coit
Systems Administrator
http://www.chapterthree.com

GUI Issues

R-H's picture

I faced the same issues too. Using terminal it's possible to manage your server under the "Ubuntu" user that the 10.04 Lucid server requires. If you want to use a GUI (filezilla or whatever) you're blocked. I think you can always work with a local version of you files and then use some sort of version control to sync between your local version and your server. Benefit is that you get version control in the process too. Wondering if anyone has any thoughts here.

This article has a good bit on using GIT for versioning with Drupal.

http://www.lullabot.com/articles/site-development-workflow-keep-it-code

Changing User Permissions

R-H's picture

Just wondering if anyone has any thoughts about the downside of changing permissions for the "Ubuntu" user to include write permissions. This seems like the simplest solution.

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: