Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was just testing specifying limit on file size to a user and have added the following to /etc/security/limits.conf
bob soft fsize 100
This basically should have said not to allow bob to create anyfile greater than 100Kb in size.
But the interesting thing is, if bob already has any file which is greater than 100Kb in size, it even doesn't allow to log him into the system both from console and SSH. Also nothing is logged in logs..
How do I configure it so that, bob can login to the system even though he has any file greater than 100Kb (but doesn't allow him to create file which are greater than 100Kb) ??
Last edited by sang_froid; 06-13-2011 at 04:08 PM.
The reason he is not able to login because there is just one limit set i.e. soft limit and that is acting as a hard limit as well because you have not specified the hard limit exclusively.
You should edit the line to read as follows:
bob soft fsize 100
bob hard fsize 5000
Which will then set a soft limit of 100 KB and hard limit of 5 MB for Bob. And yes if he is not having any file which is bigger than 5 MB then he will be able to login.
ok... in that case, if I specify both hard and soft limits to the user and if the user exceeds his limit, why is he disallowed to even login ?
He should have only been supposed to disallow create files which are greater than 5Mb in that case. It should have been something like he should have been able to login, create any number of files less than 5Mb, but not a single file greater than 5Mb.
Quote:
Originally Posted by T3RM1NVT0R
Hi there,
The reason he is not able to login because there is just one limit set i.e. soft limit and that is acting as a hard limit as well because you have not specified the hard limit exclusively.
You should edit the line to read as follows:
bob soft fsize 100
bob hard fsize 5000
Which will then set a soft limit of 100 KB and hard limit of 5 MB for Bob. And yes if he is not having any file which is bigger than 5 MB then he will be able to login.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.