hotyopa has asked for the wisdom of the Perl Monks concerning the following question:
I am implementing a flat file database on a secured server and having a little bit of a problem.
The script is currently writing files as user www-data and group www-data. Our sysadmin guy wants to be able to clear the data directory in the future, but can't as he's not the owner of the files.
I've tried a system() call to chown after the file has been written, but it isn't working (I suspect because only the superuser can do that).
Does anybody know the best way to have the sysadmin guy made the owner of the files as they are written?
PS. Its writing directories too.
Thanks,
Anton
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing a file as someone else
by chipmunk (Parson) on Dec 14, 2000 at 11:02 UTC | |
|
Re: Writing a file as someone else
by Daniellek (Sexton) on Dec 14, 2000 at 14:50 UTC | |
|
Re: Writing a file as someone else
by repson (Chaplain) on Dec 14, 2000 at 11:08 UTC | |
|
Re: Writing a file as someone else
by coreolyn (Parson) on Dec 14, 2000 at 21:03 UTC | |
by merlyn (Sage) on Dec 14, 2000 at 21:12 UTC | |
by coreolyn (Parson) on Dec 14, 2000 at 21:14 UTC | |
|
Re: Writing a file as someone else (why the sysadmin cant be root)
by hotyopa (Scribe) on Dec 15, 2000 at 03:03 UTC |