LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (http://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   How to limit file size in the secure FTP (http://www.linuxquestions.org/questions/slackware-installation-40/how-to-limit-file-size-in-the-secure-ftp-4175499602/)

mignon_djal 03-26-2014 08:46 PM

How to limit file size in the secure FTP
 
I am using a slackware version 13.37 and i have done some configuration on vsftpd.conf in allow only users from one group to access the FTP server. Now I want to limit the file size that files should not exceed 3MB and also deny(take negative action) to an executable file.

Based on my research i have to confugure the /etc/security/limits.conf, the problem is that this file does not appear on my slackware but if i call ulimit -a it will display the list of everything that can be change.

Any help what to do or how to setup/download the package to access the file limits.conf??

TracyTiger 03-26-2014 11:50 PM

Quote:

Originally Posted by mignon_djal (Post 5141906)
... and also deny(take negative action) to an executable file.

Welcome to the Slackware section of LQ.

Aside from any configuration options you may use with the FTP server program, you can help secure your environment by using options in mounting the file system where the transmitted files will reside.

That is you can mount the file system with the option noexec which should prevent the running of files uploaded.

mignon_djal 03-27-2014 12:46 PM

Hi Tracy,

Thank you for your help... Can you please give a sample of how to mound the file system to use the option noexec

TracyTiger 03-28-2014 12:52 AM

Say that an ext4 file system on /dev/sda7 was to be mounted at /ftpfiles. As root you could manually do the job with ...

Code:

mkdir /ftpfiles
mount -t ext4 -o noexec /dev/sda7 /ftpfiles

For this to happen at every boot you would put it in /etc/fstab as ...

Code:

/dev/sda7    /ftpfiles    ext4    rw,auto,noexec    1  2
Of course you should add addtional options as appropriate. This is just an example using the noexec option.

You can simply type mount to see how all of the filesystems on your computer are currently mounted.

See man mount for more information.


All times are GMT -5. The time now is 08:26 PM.