|
Posted by David Haynes on 02/23/06 04:12
Stephen wrote:
> Hi All!
>
> This really is a file permissions problem ... although I'm not sure how
> to solve it. Any assistance would be greatly appreciated.
>
> I have a series of load balanced servers. Each of the servers is
> arranged exactly the same and handles file uploads from users as
> follows:
>
> 1) User submits file to www1 server
> 2) www1 server saves file with permissions showing user "www" is the
> owner, dir owner is the group for the file ("sg" in this case).
> 3) cron script on www1 scp's the file to www2 server.
>
> All of this works great up until the following happens ...
>
> 4) User resubmits the file to www2 server
> 5) www2 attempts to update file located on www2 server with new
> version, but cannot modify file (attempting to overwrite a file owned
> by sg/sg with a file to be owned by www/sg).
> 6) User continues to see old image, new image is not replicated
>
> Where am I going wrong here? Any assistance would be appreciated.
>
> Stephen
>
In summary, www2 has a file owned by www with group sg in a directory
owned by sg with group sg and user www with group sg wants to write to it.
So, the directory needs to have group write and (probably) execute on
it. (eg. chmod 750 or 770) That way any group sg account may write files
to the directory (as well as delete). Execute may not me necessary, but
I think its needed for the delete operation. Its an easy to test to find
the minimum permission set that does what you want.
I probably would have just set up the shared files as an NFS mount and
have any of the front-end servers read/write to it but you may have good
reasons for doing it the way you did.
-david-
Navigation:
[Reply to this message]
|