Old 25th August 2008, 10:02
itti itti is offline
Junior Member
Join Date: Apr 2007
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
Cool Proftpd and dir/file mask

I've installed a proftpd FTP server with MySQL support on my Cntos 5 box (starting from the clear howto by Falko). After a bit I got my server up and running. The only thing I'm not able to obtain is settimg dir and file permissions such as I want.

I want a default mask 022 for all the user uploads but actually the server by default gives a 066 permission mask, with read permission for evrerybody without execution permission that causes php scripts not being processed by the web server.

I put two directives (related to this) into /etc/proftpd.conf

Umask 022
CreateHome on dirmode 755

The second line only to hawe also root dir created with the 022 mask.

The result is that the home dir is created
drwx------ (700 umask 077)
and any file inside it
-rw-r--r-- (644 umask 133)

the parent dir of the home dir is owned by the proftftpd user (that one listed in the config file) and has 755 file permissions.

Can you give me some insight ? Where can I take a look ?

Thank you,
Reply With Quote
Sponsored Links
Old 26th August 2008, 19:45
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts

Did you restart ProFTPd? Are there any errors in your logs?
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
Old 26th August 2008, 20:16
itti itti is offline
Junior Member
Join Date: Apr 2007
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
Default Found!

Thank you Falko,
I found the problem; when I was reading the manual for CreateHome option I had some misunderstanding about CreateMode:

by default proftpd creates the home dir with mask 0700; the specification dirmode 755 does affect the parent directories eventually created together with the home dir.

The correct directive is:
CreateHome on 755 dirmode 755

Now it works!
Reply With Quote


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

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

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