How can i forbid file deletion but allow file addition in a dir ?
How do i assign custom permission (that depends upon its dirname) to newly created file ?
From java, I use the following code to create a file:
File dirName = new File("/var/www/html/nyk/app/webroot/MusicDB/music.db");
But the file gets created with a 'lock symbol' on top of it which indicates restricted permissions. I am able to change the permissions of this file manually from terminal using cgmod -R 777 filename .
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.
I'm freaking out, I accidentally deleted the main of a project I've been working on for a week when I misused a custom compile command in bash.
I still have the main.o file and the last compilation (exe) file, but the whole code (.c) is gone!
Is there any way to fix this, I'm freaking desperate!
I want to compare or get delta of two files that means if a file or directory has just been renamed or moved or changed into another folder will handle these operations like a deletion and subsequent file (re)creation, resulting in re-transmitting the entire file or even directory to the mirror location at the new location or with the new name or a file that made changes then how can i get that ch