Folder permissions

Hi Team,

I want to set permissions to one folder in such a way that the user can write files or create folder inside that but should not able to delete it.

Basically reason behind this is i am using Pidgin Messenger. There is a directory of logs in which, when user chat its store his logs. Users delete the logs from going in the directory. Our management need to track the logs, whether users are using it for official use OR using for personal chat.

Please tell me the way through i can set permissions OR any alternate way to do this.

Thanks & Regards,
Parag Nehete

You will have to write some sort of script either in C, perl, or shell that changes the owner of each log file to root, when it is created - see the inotify man page on how to do this.

If you need help please post your exact requirements, with sample directory name(s) and sample file names.

There is a folder in users home directory.

drwx------ .purple/logs/jabber/<parag>@jabber.<domain_name>/

Inside this there is folder of the user whom he chat. Say John is the user. Then at the first time when he chat it will create a folder like

drwx------ john@jabber.<domain_name>

The above folder contains html OR txt log files which has permissions -rw-r--r--

Every file & folder is owned by parag & has some default group.

When user chat with any person, the logs are generated. I need that log should generate, but users should not able to delete the files or folders inside .purple/logs/jabber/<parag>@jabber.<domain_name>/