HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   unison load balancing not keeping file permissions (http://www.howtoforge.com/forums/showthread.php?t=59650)

waltereyanu 20th November 2012 15:49

unison load balancing not keeping file permissions
 
Hello, am building a load balancer with unison, however though the files are coped file from one server to the other, their file permissions are reset to root:root. Is there a way of keeping file permissions intact and also how do i copy users from main server to back-up server?

till 20th November 2012 15:55

Did you take a look at the configuration described in the debian 6 ispconfig 3 cluster Tutorial? The unsison configuration used in that guide keeps the file permissions during sync.

waltereyanu 21st November 2012 06:34

Yes i did follow the settings, this the tutorial i was following:http://www.howtoforge.com/installing...ispconfig-3-p5

waltereyanu 21st November 2012 09:59

Hey Till, i have configured my domains with 2 A records, for testing purposes i switch off server1 and the websites now show:
Quote:

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.
Further investigations show that in the folder /etc/nginx/sites-enabled/ on server1 are not the same with server2 do i also have to sync them just as the /var/www/ folder?

waltereyanu 21st November 2012 10:02

Even if i do a copy those files have got links attacked to them and this is a sample:
Quote:

lrwxrwxrwx 1 root root 37 Nov 19 18:44 000-apps.vhost -> /etc/nginx/sites-available/apps.vhost
lrwxrwxrwx 1 root root 34 Nov 19 18:25 default -> /etc/nginx/sites-available/default

till 21st November 2012 10:30

These are links and have to be links and not files. The owner of the link shall be root and the permissions are fine as well.

Quote:

Further investigations show that in the folder /etc/nginx/sites-enabled/ on server1 are not the same with server2 do i also have to sync them just as the /var/www/ folder?
No, they are synced by ispconfig. Dont apply any other sync like unison on them or you will break the server!

If they dont get mirrored by ispconfig, then your slave server is not setup correctly or you did not add the salve server before you added the first website on the master. The most likely reason is that the slave can not connect to the master due to wrong host settings. See here for debug instructions:

http://www.howtoforge.com/forums/showthread.php?t=58408

Reagrding the unison sync problem, if your slave server is not connected correctly to the master or you added sites on the master before you added the slave, then the users that own the files dont exist on the slave which will explain why unison has to store the files as root.


All times are GMT +2. The time now is 14:39.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.