LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-07-2014, 01:59 PM   #1
BeachHead
LQ Newbie
 
Registered: May 2012
Location: Germany
Distribution: Arch, AOSP
Posts: 24

Rep: Reputation: 2
ext4 - permission to create/modify a file without 'delete' permission


Hallo,
i want to catch a temp file with dynamic name created by a program that is available only for some milliseconds. For this i probably need some permissions like this: Create/modify but no delete.

I can do this with NTFS but on ext4 it seems impossible. Chattr +i +u or setting folder to sticky seems useless. Setting folder to read-only probably works only if the file would already exist (allows 'modification' and 'no deletion' but unfortunately no 'creation').

Any suggestions?

Last edited by BeachHead; 06-07-2014 at 02:08 PM.
 
Old 06-08-2014, 07:31 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603
Quote:
Originally Posted by BeachHead View Post
i want to catch a temp file with dynamic name created by a program that is available only for some milliseconds.
If you mean "catch" as in "log" then you could use the audit service or FUSE LoggedFS or inotify(wait)?
 
1 members found this post helpful.
Old 06-08-2014, 05:01 PM   #3
BeachHead
LQ Newbie
 
Registered: May 2012
Location: Germany
Distribution: Arch, AOSP
Posts: 24

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by unSpawn View Post
If you mean "catch" as in "log" then you could use the audit service or FUSE LoggedFS or inotify(wait)?
No, that unfortunately doesn't help. Its a binary file and i'm trying to get it before it gets deleted.
 
Old 06-08-2014, 08:16 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,804

Rep: Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224
If this is a file that the program creates and immediately deletes while keeping the file open for its own use, you can still access the file via the /proc/{PID}/fd/{FD#} link.
 
1 members found this post helpful.
Old 06-08-2014, 08:34 PM   #5
BeachHead
LQ Newbie
 
Registered: May 2012
Location: Germany
Distribution: Arch, AOSP
Posts: 24

Original Poster
Rep: Reputation: 2
That works indeed.
What a valuable tip.. Thank you!
 
  


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
File & Folder Permission and Ownership permission error in Cloud storage. rhcekumaran Linux - Newbie 3 06-14-2013 05:41 AM
File create/modify/delete monitoring with user account wdominick Linux - Software 3 01-27-2011 04:11 PM
[SOLVED] Can't delete file (rm: cannot remove `nagios': Permission denied) junust Linux - General 2 07-11-2010 10:59 AM
Samba MODIFY permission needs 'x' permission set in Linux? jlinkels Linux - Software 6 11-13-2009 10:30 AM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 03:46 AM

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

All times are GMT -5. The time now is 05:01 PM.

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