priyanka
priyanka

Reputation: 325

common directory used by all users in Linux and track updates

I want to create common directory used by all users in Linux.

I am using SLES 11.

I want to create a shared folder for project code, if any user updates any files in directory I want to keep track of who has updated the file?

e.g /home/share

-rwxrwxrwx 1 priyanka project 8 Apr 2 10:54 test2 -rwxrwxrwx 1 root root 33 Apr 2 11:10 test

suppose user xxx updates file test2 it should change its owner to xxx

-rwxrwxrwx 1 xxx project 8 Apr 2 10:54 test2

Upvotes: 1

Views: 131

Answers (1)

Pétur Ingi Egilsson
Pétur Ingi Egilsson

Reputation: 4493

You can not solve this with a simple (built in) command or a script (that I know of). You can do this in C using inotify. Here is a nice tutorialfrom IBM.

Upvotes: 2

Related Questions