Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create file by one user; move by another user

Status
Not open for further replies.

kasparov

Programmer
Feb 13, 2002
203
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top