Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th May 2010, 16:40
huey23 huey23 is offline
Junior Member
 
Join Date: May 2010
Posts: 17
Thanks: 1
Thanked 1 Time in 1 Post
Question Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Ubuntu 9.10

I used this tutorial located here: http://www.howtoforge.com/virtual-ho...ql-ubuntu-9.10

The instructions were great and it works almost flawlessly. After completing the tutorial, I tried uploading using the username and password I created. The error message was:

The uploaded file could not be moved to /location/of/dir/

The permissions on the directory when created are:

drwx--x--x 4 ftpuser ftpgroup

This is a WordPress site with the default file structure. I have read the page here but I was wondering if this is a natural occurrence from a misconfiguration of my hosting box or if it is a WordPress issue.

Is this an upload error or file permissions? I have a great feeling this is file permissions on the WP side, but what are good permissions on customer FTP directories and how would I have those perms applied as default when the user is created through MySQL?
Reply With Quote
Sponsored Links
  #2  
Old 11th May 2010, 15:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Can you try
Code:
chmod 755 /location/of/dir/
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 11th May 2010, 15:39
huey23 huey23 is offline
Junior Member
 
Join Date: May 2010
Posts: 17
Thanks: 1
Thanked 1 Time in 1 Post
Default

Falko,

Great work in this tut...

That works along with chmod +x /location/of/dir/

Although, how would I make that the default perms for that directory when it is created (after logging in to ftp).
Reply With Quote
  #4  
Old 12th May 2010, 14:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

You should use a umask of 022 in your ProFTPd configuration.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 12th May 2010, 22:03
huey23 huey23 is offline
Junior Member
 
Join Date: May 2010
Posts: 17
Thanks: 1
Thanked 1 Time in 1 Post
Default

Here are my proftpd.conf settings for umask:

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
Reply With Quote
  #6  
Old 14th May 2010, 13:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Looks ok. Are new directories still being created with the wrong permissions?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 14th May 2010, 16:21
huey23 huey23 is offline
Junior Member
 
Join Date: May 2010
Posts: 17
Thanks: 1
Thanked 1 Time in 1 Post
Default

Yes, these are the default umask settings...I did not change them.

I tried to understand the umask settings as I was reading but I was a little lost.

I will create another user and I will post my results.
Reply With Quote
  #8  
Old 27th May 2010, 17:53
huey23 huey23 is offline
Junior Member
 
Join Date: May 2010
Posts: 17
Thanks: 1
Thanked 1 Time in 1 Post
Default

Here are the results of the new user being added:

drwx------ 2 ftpuser ftpgroup 4096 2010-05-27 11:48 www.testing123.com

I created a couple of simple php pages to do the user adding for me. I have the SQL queries in the php. I was thinking I can just change to the newly created dir and "chmod +x" that dir at the end of the script but I cannot do that because the dir is not created until they login through FTP. Are there any other suggestions to make the default perms on the new dirs when they are created?

Thanks!!
Reply With Quote
  #9  
Old 3rd June 2010, 08:02
rgunawans rgunawans is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Some configuration won't work

I've 2 question regarding this tutorial:
1. I've create new user in mysql table, let say user1, when I'm try to login using Filezilla, it said that there's no such user. Then I'm create usre1 in linux system, and try to login, it said succeded. That user can upload and download. Is there something wrong with my configuration? I've follow this tutorial twice.. I'm using Ubuntu 10.04, is that cause this error?
2. Is it possible to block update for user1, and give access to admin_user1 for download and upload to the server?
Reply With Quote
  #10  
Old 4th June 2010, 08:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
 
Default

Quote:
Originally Posted by rgunawans View Post
I've 2 question regarding this tutorial:
1. I've create new user in mysql table, let say user1, when I'm try to login using Filezilla, it said that there's no such user. Then I'm create usre1 in linux system, and try to login, it said succeded. That user can upload and download. Is there something wrong with my configuration? I've follow this tutorial twice.. I'm using Ubuntu 10.04, is that cause this error?
Are you sure you have ProFTPd running and not some other FTP server? What's the output of
Code:
netstat -tap
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Tags
ftp, mysql, permissions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Ubuntu 8.04 LTS nix4me HOWTO-Related Questions 2 17th June 2009 17:11
Virtual Hosting With Proftpd And MySQL (Incl. Quota) Apache trouble kiladila HOWTO-Related Questions 1 29th April 2009 12:02
Virtual Hosting With Proftpd And MySQL (Incl. Quota) Quinton HOWTO-Related Questions 3 10th January 2009 13:04
Virtual Hosting With Proftpd And MySQL (Incl. Quota) miguellamerz HOWTO-Related Questions 3 18th October 2006 01:39
Virtual Hosting With Proftpd And MySQL (Incl. Quota) Secure? ToysunStory HOWTO-Related Questions 1 9th May 2006 00:03


All times are GMT +2. The time now is 22:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.