HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Ubuntu 9.10 (http://www.howtoforge.com/forums/showthread.php?t=45719)

huey23 10th May 2010 17:40

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?

falko 11th May 2010 16:13

Can you try
Code:

chmod 755 /location/of/dir/
?

huey23 11th May 2010 16:39

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).

falko 12th May 2010 15:56

You should use a umask of 022 in your ProFTPd configuration.

huey23 12th May 2010 23:03

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

falko 14th May 2010 14:59

Looks ok. Are new directories still being created with the wrong permissions?

huey23 14th May 2010 17:21

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.

huey23 27th May 2010 18:53

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!!

rgunawans 3rd June 2010 09:02

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?

falko 4th June 2010 09:28

Quote:

Originally Posted by rgunawans (Post 230032)
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
?


All times are GMT +2. The time now is 19:53.

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