Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Aug 18, 2010 4:11 pm 
Offline
Senior Member

Joined: Tue Aug 17, 2010 5:00 pm
Posts: 61
OK, so I am a competent person, just fairly new to Linux and Apache stuff since I've used shared hosts for so long...

I am running Ubuntu 10.4 with Apache2

1) First Question
Following one fo the guides floating around here, I created a username:group, lets call it travis:filetransfer, and set the home to /srv/www/domain.com/. I can login to my server via FileZilla with that user, and it properly starts off in the /domain.com/ directory. However, it cannot write to that dir or any subdirs. I've done everything down to the "wrong way" of even chmod'ing the dir to 777, and with my limited knowledge of chown, i did "chown travis:filetransfer /srv/www/domain.com

For those cringing, I've chmod the directory back to 755, and chown'd back to root:root.

Why can't this user name do anything? I know it is going to be a config somewhere, or that I haven't fully grasped the user/user group stuff yet.

2) I came up with the first question because of the issue for my second question:
I got a WordPress blog installed and running on my domain. When trying to use the built in plug/theme installer, it asks for my ftp login info. So I used [IPAddy]:22 and my root login/password. Whether I choose FTP or FTPS, after about 15 seconds, it simply returns to a "Failed to connect to [IPAddy]:22". After some searching around, I see some people stated they were able to get this to work by doing something with the www-data group, or the apache group (or user?), but then other areas say this is incorrect. One site looked promising by having me set something using
Code:
/usr/sbin/setsebool -P httpd_can_network_connect=1

Hoever, I do not have this command.


Sorry if this got long winded, just trying to trim off any of the usual questions incase I've already tried something you were gonna suggest. I've been running sites from shared hosts for years, and on a whim wanted to give this VPS a shot, and if I can get past some of these snags, I'll eventually migrate all my sites to my VPS.

Thanks in advance for any help.


Top
   
 Post subject:
PostPosted: Wed Aug 18, 2010 4:20 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
And what FTP server app are you using - and how do you have it configured?


Top
   
 Post subject:
PostPosted: Wed Aug 18, 2010 5:31 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Do you really need FTP? SFTP is a better choice.


Top
   
PostPosted: Wed Aug 18, 2010 7:17 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
telijah wrote:
So I used [IPAddy]:22 and my root login/password. Whether I choose FTP or FTPS, after about 15 seconds, it simply returns to a "Failed to connect to [IPAddy]:22".

22 is SSH and SFTP. Filezila can connect using SFTP, mind.
FTP and FTPS are 21. Do you have an FTP(S) server installed at all?
Pure-FTPd, vsFTPd, proFTPd?


Top
   
 Post subject:
PostPosted: Thu Aug 19, 2010 8:43 am 
Offline
Senior Member

Joined: Tue Aug 17, 2010 5:00 pm
Posts: 61
vonskippy and rsk: Interesting, I have not installed any. See, during one of the guides, when it had me log in using FileZilla with my root login/password, I assumed an FTP server already existed, but that is clearly wrong since I have not installed any yet.

orb: I imagine I DO need one for Wordpress, as it's only options are FTP and FTPS.

I'll go look up installing vsFTPd as I've seen a lot of documentation on that one already, unless you guys see other reasons to go with another. I don't need terribly "powerful" or feature rich options. As long as I can setup a user and assign any home directory I'd like.

Thanks for the info guys.


Top
   
 Post subject:
PostPosted: Thu Aug 19, 2010 11:36 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
I'm personally a fan of pure-ftpd, it's nice, simple, and has a low footprint. Can be compiled to use system user database, or a separate one, in plaintext, mysql, or postgres storage. Also, there are "true chroot" and "fake chroot" builds, where the latter allows you to escape the home directory via symlinks. Debian offers all variations pre-packaged.
Remember, you want to use FTP only as a last resort. Wordpress connecting via 127.0.0.1 is safe (well, as far as one can use "wordpress" and "safe" together). Letting your users upload files via it... not so much.


Top
   
 Post subject:
PostPosted: Thu Aug 19, 2010 3:25 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
If you're the only one using wordpress, when you need wordpress to install an update or a plugin, simply chown the wordpress files to the user running your php scripts, install the update/plugin then chown it back to whoever owned it previously. That way you've no need for a nasty ftp server.


Top
   
 Post subject:
PostPosted: Thu Aug 19, 2010 5:07 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
telijah wrote:
I'll go look up installing vsFTPd as I've seen a lot of documentation on that one already, unless you guys see other reasons to go with another. I don't need terribly "powerful" or feature rich options. As long as I can setup a user and assign any home directory I'd like.

That's what I currently use on one server for site updates, and yes, it's pretty easy to isolate the directory used for each authenticated user through per-user config files. The users don't have to exist as actual users on the system if you don't want, but can simply be used for FTP authentication, then appearing as a guest account in terms of filesystem protections.

As for the FTP vs. SFTP question, for me it was part a legacy issue on the part of clients, but also when I went looking I really found no decent way to provide SFTP with each user locked into a configured directory, and that didn't require actual login accounts on the system.

vsftpd also supports FTPS which (client support permitting - FileZilla does for example) can keep things just as secure.

-- David


Top
   
PostPosted: Wed Oct 06, 2010 2:27 pm 
Offline

Joined: Wed Oct 06, 2010 2:19 pm
Posts: 1
We just set up our first Linode this week to run our Wordpress blog, which has outgrown shared hosting. Initially we installed the LAMP/Wordpress stack. Using that setup, I was able to download plugins from within Wordpress with no problem.

However, the script places Wordpress in a directory rather than in the public root. This was going to create lots of problems for our migration, so we did a clean LAMP (Ubuntu) install and then a fresh WP install in the public root. Everything seems to work except I get the exact same error the OP described when I try to add plugins.

I tried CHMODing the contents dir to 777 and that didn't help at all.

I guess my question is this. What is in the all-in-one Wordpress stack script that solves this problem? Does it install FTP as well? Somehow it makes the plugin download/upgrade work. Does anyone know how? I'm thinking this might be a simpler way to solve the problem.

Also, I'm going to request a root option be added to the script if I can find the right thread on this forum. This would make life a lot easier.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group