Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have the directory: /home/ftp/download.

I would like to allow only downloading from this directory i proftpd.

I used the following config but it doesn't work:

<Directory /home/ftp/download/>
   <Limit STOR STOU>
       DenyAll
   </Limit>    
</Directory>

STOR = (Transfer a file from the client to the server)

Any idea?

share|improve this question

2 Answers 2

Assuming your other config and file permissions are correctly mapped, this should allow to download, but no upload.

Directory /home/ftp/download/>
    <Limit READ>
       AllowAll
   </Limit>    
   <Limit STOR STOU>
       DenyAll
   </Limit>    
</Directory>
share|improve this answer
    
No! I can still upload files to /home/ftp/download. Maybe a need to chmod /download with a specific way. –  Oualid Jan 14 at 16:07
    
what if you change the order? –  Danila Ladner Jan 14 at 16:09
    
No difference. It doesn't work because maybe i am using FTP+SSL, SFTP. –  Oualid Jan 14 at 16:23
    
And if you try to add WRITE in block <Limit STOR STOU WRITE>DenyAll</Limit> ? –  krisFR Jan 14 at 16:27
    
It doesn't matter. Can you pastebin the config? It is hard to troubleshoot something so blindly. –  Danila Ladner Jan 14 at 16:28
up vote 0 down vote accepted

I run sftp and not ftp.

sftp runs by openssh.

ftp runs by proftpd.

The changes didn't take effect because I run sftp and not ftp in the ftp client.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.