Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 06-17-2005, 03:52 AM   #1
LQ Newbie
Registered: Jun 2005
Posts: 9

Rep: Reputation: 0
Deleting a file created by root

Without going into too much detail:
I have a daemon running as a root process.
It creates a file (e.g. foo) that serves as a signal to a bash script.
Once the bash script detects the presence of foo, it performs its actions and then is supposed to delete the foo file.

The bash script is started automatically when any non-root account is logged into. The problem occurs when the bash script tries to delete foo, I get a 'permission denied' message.

As I understand it, since the bash script is running as a process under a user acct, it does not have the permission to delete a file created by a root process.

I tried having the root process use chmod 777 foo, but this still did not allow the bash script to delete the foo.

What am I doing wrong? I am using RedHat Fedora 3

Any help is much appreciated
Old 06-17-2005, 04:12 AM   #2
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
check the permissions of your script running folder also,check whether a nonroot user can able to access it or not.
Old 06-17-2005, 11:22 AM   #3
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
You need write access to the parent directory to delete files, not the files themselves.


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
1 can't (root can) read from partition created by fedora during install Ace2005 Fedora 8 06-24-2005 09:08 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 05:54 PM
Sound works for root and first user created, no one else downinthemine Linux - Hardware 7 01-15-2004 09:44 PM
Deleting the newly created files keeping the existing icorsi Linux - Newbie 2 10-07-2001 12:16 PM
Deleting newly created files keeping the existing ones icorsi Linux - General 0 10-07-2001 01:17 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:15 AM.

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