LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices

Reply
 
Search this Thread
Old 03-26-2014, 08:46 PM   #1
mignon_djal
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Rep: Reputation: Disabled
Red face 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??
 
Old 03-26-2014, 11:50 PM   #2
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 304

Rep: Reputation: 76
Quote:
Originally Posted by mignon_djal View Post
... 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.
 
Old 03-27-2014, 12:46 PM   #3
mignon_djal
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-28-2014, 12:52 AM   #4
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 304

Rep: Reputation: 76
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP Server , limit to set maximum size to upload a file pankajguptaspn Linux - General 1 01-26-2012 08:40 AM
limit on file size sang_froid Linux - General 3 06-14-2011 02:40 PM
File Size limit? compu73rg33k Linux - Software 1 02-27-2005 11:11 PM
File Size Limit?? Manuel-H Linux - Software 1 04-16-2004 04:23 AM
File size limit petway56 Linux - General 4 05-08-2003 12:19 AM


All times are GMT -5. The time now is 09:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration