LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 01-26-2011, 01:51 PM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 111,135

Rep: Reputation: 117Reputation: 117
LXer: Should We Abolish User Access to rm?


Published at LXer:

Lately, Iíve been hearing system administrators and managers ask about solutions to keep people from accidentally removing their data. These are very smart and dedicated people asking for a solution so that data isnít lost either by accident or on purpose. A wild idea Iíve heard to solve the problem is getting rid of user access to the rm command. Is this truly a crazy idea?

Read More...
 
Old 01-26-2011, 02:31 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
First you have to decide who the data belongs to.
 
Old 01-26-2011, 04:22 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867
I don't think that a restriction access to rm would help. Some users are dumb enough to delete their data in the app that they are using and then save the file. This way, the data is also lost, without using rm.

Question: If I delete a file using a file-manager, is this file-manager using rm to delete it?
 
Old 01-27-2011, 04:33 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
Quote:
Originally Posted by TobiSGD View Post
Question: If I delete a file using a file-manager, is this file-manager using rm to delete it?
Depends on the file manager and settings. I set it to delete files immediately without confirmation (using rm) ... and I have never deleted any file I didn't want to delete ... no mistakes.

I think it's the extra confirmation that induces mistakes. I remember when I was using Window$ that there was always a confirmation, and sometimes I pressed the wrong button. It seems that removing the confirmation helps because: it makes you more careful, and it removes unnecessary confirmation.

For root, I have made a wrapper script for rm that will prevent deleting top level directories and two levels down or so, plus no recursive.
 
Old 01-27-2011, 11:14 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,811
Blog Entries: 58

Rep: Reputation: Disabled
Are you sure you want to delete?
Yes
Really certain?
Yes
Last chance. Are you sure you don't want to change your mind?
Yes
OK then, but don't come crying to me in a couple of days when you realise you've made a mistake.
 
Old 01-27-2011, 11:30 AM   #6
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,924

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
Quote:
Originally Posted by brianL View Post
Are you sure you want to delete?
Yes
Really certain?
Yes
Last chance. Are you sure you don't want to change your mind?
Yes
OK then, but don't come crying to me in a couple of days when you realise you've made a mistake.
Sounds like Debian to me. I have a shell account at my uni. their server is running Debian and every time I want to rm a file in my directory I am always asked to confirm it. Its fscking annoying, especially when I want to just get rid of a directory, then I get asked file-by-file if I want to delete it!
Attachment 5980

Is this how Debian is by default? If so it is just plain fscking stupid if you ask me!

Last edited by Jeebizz; 05-24-2011 at 01:27 PM.
 
Old 01-27-2011, 11:34 AM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,811
Blog Entries: 58

Rep: Reputation: Disabled
Mmm, never come across that before. Maybe rm is aliased by default to rm -i.
Next time I boot into my debian, I'll try deleting something.

Last edited by brianL; 01-27-2011 at 11:38 AM.
 
Old 01-27-2011, 11:40 AM   #8
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,924

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
Perhaps, but even the login shell wasn't to my liking until I put:
Code:
export PS1='\u@\h:\w\$ '
in .bashrc. I got tired of issuing pwd to remind me what directory I was in. Plus it felt more like Slackware again .

-edit

You were right. I checked .bash_aliases:

alias rm='rm -i' I'll just go ahead and change that now...

Last edited by Jeebizz; 01-27-2011 at 11:42 AM.
 
Old 01-27-2011, 11:41 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867Reputation: 4867
Quote:
Originally Posted by Jeebizz View Post
Sounds like Debian to me. I have a shell account at my uni. their server is running Debian and every time I want to rm a file in my directory I am always asked to confirm it. Its fscking annoying, especially when I want to just get rid of a directory, then I get asked file-by-file if I want to delete it!
Attachment 5980

Is this how Debian is by default? If so it is just plain fscking stupid if you ask me!
That is not the Debian default. I think the administrators have set up an alias for rm to rm -i. May be they have to deal with many dumb users.

Quote:
Perhaps, but even the login shell wasn't to my liking until I put:
Code:

export PS1='\u@\h:\w\$ '

in .bashrc. I got tired of issuing pwd to remind me what directory I was in. Plus it felt more like Slackware again .
Also not Debian default. I never chnged the prompt and I can see where I am.

Last edited by TobiSGD; 01-27-2011 at 11:44 AM.
 
Old 01-27-2011, 11:45 AM   #10
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,811
Blog Entries: 58

Rep: Reputation: Disabled
I've got some weird kind of love/hate relationship with Debian. I keep installing it as a dual-boot with Slack, then getting fed up with it after a couple of weeks. This has happened a few times.
 
Old 01-27-2011, 11:45 AM   #11
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,924

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
Huh, well I just took out alias rm= 'rm -i', logged out and came back, and it still acts the same...
 
Old 01-27-2011, 11:47 AM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,811
Blog Entries: 58

Rep: Reputation: Disabled
Are you sure you want to remove rm -i?
Really certain?
etc
etc
etc
 
Old 01-27-2011, 11:53 AM   #13
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by H_TeXMeX_H View Post
For root, I have made a wrapper script for rm that will prevent deleting top level directories and two levels down or so, plus no recursive.
GNU rm already has a --preserve-root flag (which is enabled by default), so that even as root, you can't rm the contents of the root directory.
 
Old 01-27-2011, 11:56 AM   #14
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by Jeebizz View Post
Huh, well I just took out alias rm= 'rm -i', logged out and came back, and it still acts the same...
It's probably set from /etc/profile too. Try putting unalias rm in your .bash_profile or .bashrc.

However, if you delete all your work and ask the sysadmins to put it back, they may not take too kindly to you having removed their safety net...
 
Old 01-27-2011, 12:05 PM   #15
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,924

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
Ah well I don't have .bash_profile, and that file isn't even located in /usr/share/skel, just .bashrc where I copied to my home so I could at least change the way my login prompt is. I obviously can't modify /etc/profile but the alias for rm isn't even there anyways. Also I already removed alias rm= i from that file (.bash_aliases in my home).

Again I only assumed this is how Debian is by default, since all the aliases and .bashrc stuff is in some folder called /skel in /usr/share which is also something not found in Slackware.

Oh well I guess I will just have to live with it. At least my prompt is in the proper manner.

Last edited by Jeebizz; 01-27-2011 at 12:06 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: User space memory access from the Linux kernel LXer Syndicated Linux News 0 08-13-2010 06:40 AM
LXer: Open letter to abolish software patents in Australia LXer Syndicated Linux News 1 08-13-2010 04:00 AM
vsftpd read access for user accounts but needs write access ncsuapex Linux - Server 2 04-23-2010 10:51 AM
LXer: User security and access control in JBoss portals LXer Syndicated Linux News 0 01-29-2009 05:00 PM
I lose ftp access when I disable shell access for user captainObvious Linux - General 3 11-13-2004 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 07:15 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
Open Source Consulting | Domain Registration