LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2012, 09:48 AM   #1
eyanu
Member
 
Registered: Jul 2012
Location: kampala,Uganda
Distribution: backtrack
Posts: 87

Rep: Reputation: Disabled
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?
 
Old 11-20-2012, 10:53 AM   #2
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
So have you set the setuid and setgid flags set on the directory your trying to sync up? It sounds like the unison process is changing the permissions when it runs, if you set the the uid and gid using chmod g+s does it still change the permissions?
 
Old 11-20-2012, 02:01 PM   #3
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Arch
Posts: 3,013

Rep: Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225
The Unison Manual says:
Quote:
  • For security reasons, the Unix setuid and setgid bits are not propagated.
  • The Unix owner and group ids are not propagated. (What would this mean, in general?) All files are created with the owner and group of the server process.
 
2 members found this post helpful.
Old 11-20-2012, 04:16 PM   #4
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
Well said ntubski for some reason I equated unison with rsync, I didn't know that it strips those.
 
Old 11-21-2012, 12:39 AM   #5
eyanu
Member
 
Registered: Jul 2012
Location: kampala,Uganda
Distribution: backtrack
Posts: 87

Original Poster
Rep: Reputation: Disabled
Am trying to sync /var/www/ which belongs to root:root and it has domains that now belong to different users, so should i set uid+gid on /var/www/?? or on the domains inside that folder?
 
Old 11-21-2012, 04:08 AM   #6
eyanu
Member
 
Registered: Jul 2012
Location: kampala,Uganda
Distribution: backtrack
Posts: 87

Original Poster
Rep: Reputation: Disabled
Hey guys i finally figured out the permissions problem, but now the other problem is that i configured my domains with two A records so that in case server1 goes down server2's IP will be reflected and when for testing purposes i switch off server1 my 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.
Investigating further brought to a folder called /etc/nginx/sites-enabled/ and these are samples of the contents on server2 which are not the same as server1 as server1 contains the domains with links
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
Should i just copy them from server1 to server2 and how do i keep the soft links on them?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ip load balancing jonfa Linux - Networking 1 05-21-2008 12:49 AM
Load Balancing laurent01 Linux - Networking 6 02-22-2006 03:38 PM
how to do load balancing? yenonn Linux - Networking 2 07-27-2004 10:20 PM
can't load mandrake, says i dont have file permissions? wtf! agh help plz rApT0r Linux - Newbie 2 04-11-2004 04:26 PM
Load balancing ?? Lucsi Linux - Newbie 1 07-16-2002 01:54 PM


All times are GMT -5. The time now is 02:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration