LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2008, 06:12 AM   #1
deepak_cucek
Member
 
Registered: Feb 2008
Posts: 36

Rep: Reputation: 16
regarding command "ulimit"


--------------------------------------------------------------------------------

Hi

i am totally new to this forum as well as linux...
as per my knowledge by using "ulimit" we can restrict the size of file that can create by user.

but in one folder i make the ulimit as 1kb by "ulimit -f 1"
but still i can create the file with more than 1kb ..
i need completely user need to prevent for creating file in the particular folder

[sorry for bad english]
 
Old 02-04-2008, 08:18 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,761

Rep: Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587
Quote:
i need completely user need to prevent for creating file in the particular folder
If you don't want a user to be able to create file in a specific folder, then you should change the folder rights accordingly.
If you want the user to be able to create files smaller that 1K, then you can edit /etc/security/limits.conf and add the line:
Code:
@username hard fsize 1
 
Old 02-04-2008, 10:48 PM   #3
deepak_cucek
Member
 
Registered: Feb 2008
Posts: 36

Original Poster
Rep: Reputation: 16
dude it is not working for me.......
i made the change as per your instructions...

NB : i enterd as "root" user
 
Old 02-05-2008, 02:06 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,761

Rep: Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587
You can try
Code:
username hard fsize 1
without the "@".
In redhat it works both ways, but I've tested it on a Suse box and it's not working with the "@"
What distro are you using anyway?
 
Old 02-05-2008, 02:10 AM   #5
thorgal31
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Rep: Reputation: 0
You also have to add the line

Code:
session required /lib/security/pam_limits.so
to the pam config file : /etc/pam.d/{gdm,kdm,login} according to your config.

See the following link for more details : http://www.kernel.org/pub/linux/libs...x-PAM_SAG.html
 
  


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
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
C Drive "/dev/hda1" accidently used in dd command at "of=" switch M D Linux - Software 4 04-26-2007 08:56 AM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM


All times are GMT -5. The time now is 04:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration