I have a system where a file is ftp'd to our server by one user (ID=ftp_user; group=staff - for the sake of illustration). I want another user (ID=my_user; group=my_group) to run a script in cron which looks for the file & when it arrives, to move it to another area.
User my_user can't move it (because it doesn't have rights to remove it from that directory).
My question is what are your suggestions for the easiest /most efficient/most easily maintainable way of achieving this. I could:
1. copy it & run another script (as ftp_user or root to remove it) but this means running a second script
2. run a script as root to change the owner but this means running a second script
3. use the SUID but when the file is created by ftp how can I set this other than by a second script?
I could get any of these to work but I dislike them all because they require a second script & so would be less easy to maintain.
Maybe I have to live with that for the sake of the security but I wonder what your views are? & I may well have missed an option.
Thanks, Chris
User my_user can't move it (because it doesn't have rights to remove it from that directory).
My question is what are your suggestions for the easiest /most efficient/most easily maintainable way of achieving this. I could:
1. copy it & run another script (as ftp_user or root to remove it) but this means running a second script
2. run a script as root to change the owner but this means running a second script
3. use the SUID but when the file is created by ftp how can I set this other than by a second script?
I could get any of these to work but I dislike them all because they require a second script & so would be less easy to maintain.
Maybe I have to live with that for the sake of the security but I wonder what your views are? & I may well have missed an option.
Thanks, Chris