开发者

Programatically syncing a web project to a Linux server

开发者 https://www.devze.com 2023-04-11 07:55 出处:网络
I have an old web project that gets rsynced to some Ubuntu box using a little script. I\'m planning on using Fabric for my deployment but one thing that always bothered me - and won\'t be different wh

I have an old web project that gets rsynced to some Ubuntu box using a little script. I'm planning on using Fabric for my deployment but one thing that always bothered me - and won't be different when using Fabric - is that I never got my file access rights right.

So - I'm rsyncing al开发者_如何学Cl that project stuff using a different user then the one who's running the project (and of course needs at read/write access for these files) so I'm ending up with new files being created that can only be accessed by the sync-user and not by the project-user. I guess when I'm using Fabric I could "fix" the rights after syncing - so the project-user can read them - but I'm wondering if I got the problem wrong in the first place.

Maybe this isn't a problem with the scripts or the syncing but just some file access rights problem? Since I don't do Linux all day I guess that's an option. :)

I hope I could clearly state my problem. Any ideas?


Only privileged process can set owner of files it can set user id of files it creates to any other than their own.

I don't think it's reasonable to run rsync privileged from security point of view, so you have to run the synchronization as the project user.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号