1

I have found a solution for my problem. This is what I did:

I added the following to my /etc/proftpd/proftpd.conf:

<Limit SITE_CHMOD>
  DenyAll
</Limit>

I have the following problem:

When I upload files to my FTP server the umask I set is totally ignored. All files have permissions 644.

I use Debian 5.0.3 as operating system and proftpd 1.3.1 as ftp server. The user logging in is called mug and he is a local user (no virtual user). He is chrooted to the home directory

/home/mug/

I tried the following things:

1. set umask setting in /etc/proftpd/proftpd.conf

Umask 000  000

This should result in 777 for directories and 666 for files since directory umask is applied to 777 and file umask is applied to 666.

After that I of course restarted the proftpd to be sure that the config is reloaded.

2. set umask for the user in /home/mug/.bashrc

I added the following to the .bashrc for the user:

umask 0000

After that I reloaded the .bashrc:

source /home/mug/.bashrc

I also checked the umask setting for the user by changing to the user and using this command:

su mug umask

As result I got a umask of 0000 prompted. So this worked.

But still all my uploaded files are having 644 permissions set :(

What am I doing wrong?

2
  • What user is ProFTPD running as? Are all users having the same issue, or just that one? Oct 14, 2009 at 17:43
  • Proftpd is running as user proftpd and group is nogroup. And this also happens when I log in with other users.
    – Jens
    Oct 14, 2009 at 17:51

3 Answers 3

1

Proftp starts with an base mode of 0666, and since umask can only take rights away, you can never reach 0777.

0

Check the umask for user Proftpd and group nogroup. Since you're trying to set permissions higher than the system default, they may be restricted by their OWN umask values.

A way to check it might be to change the umask in proftpd.conf to 777; if new files show up as 000, then you know that configuration line is working.

3
  • I set the umask in proftpd.conf to 777 as you said with the same result. To change the umask for the user proftpd I changed /etc/profile (since proftpd has no home dir) and reloaded the file again via "source /etc/profile". But again: permissions are set to 644.
    – Jens
    Oct 14, 2009 at 18:11
  • Okay, so it's ignoring the umask in proftpd. Hmmmm. What version of proftpd are you using? There were a bunch of umask problems with proftpd once... Oct 14, 2009 at 18:28
  • I am using proftpdd 1.3.1. But I also tried vsftpd with the same result. So my guess is that this is related to Debian.
    – Jens
    Oct 14, 2009 at 18:30
0

It's possible that proftpd considers a ulimit of "000" bad and won't let you do that, it should log if that's the case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .