LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-11-2010, 05:17 AM   #1
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81

Rep: Reputation: 15
Can't delete file (rm: cannot remove `nagios': Permission denied)


Hello,

Code:
[serv@local subsys]$ rm -rf nagios
rm: cannot remove `nagios': Permission denied
[serv@local subsys]$ ls -l
-rwxr--r-- 1 me root 0 2010-07-11 12:59 nagios*

Code:
[serv@local subsys]$ pwd
/var/lock/subsys
[serv@local subsys]$ id
uid=1000(me) gid=100(users) groups=100(users)

P.S
file was chown from root to me
Code:
[serv@local subsys]# chown me ./nagios

What could be the problem ?

Last edited by junust; 07-11-2010 at 05:23 AM.
 
Old 07-11-2010, 08:36 AM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
You have read and write access to the file, but do you have write access to the directory it is contained in? This permission is required to remove the file (writing to the directory).
 
Old 07-11-2010, 09:59 AM   #3
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81

Original Poster
Rep: Reputation: 15
irmin

You were right, I don't have 'w' to /var/lock/subsys

thanks
 
  


Reply



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
fusesmb: permission denied to delete files in shares xri Linux - Networking 1 09-29-2007 09:03 PM
Root denied permission to remove files suse_buse Linux - General 3 10-26-2006 06:56 PM
Root denied permission to remove users' files suse_buse Linux - Security 2 10-25-2006 08:26 AM
Permission Denied when trying to delete /var robintw Linux - General 4 09-17-2005 02:00 PM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 02:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:50 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