Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

add follow=yes to my.cnf protect task, incase its a symlink. fixes #20 #21

Merged
merged 1 commit into from
Oct 11, 2016
Merged

add follow=yes to my.cnf protect task, incase its a symlink. fixes #20 #21

merged 1 commit into from
Oct 11, 2016

Conversation

rndmh3ro
Copy link
Member

@rndmh3ro rndmh3ro commented Oct 8, 2016

@fitz123, care to review and merge?

@rndmh3ro rndmh3ro changed the title add follow=yes to my.cnf protect task, incase its a symlink add follow=yes to my.cnf protect task, incase its a symlink. fix #20 Oct 8, 2016
@rndmh3ro rndmh3ro changed the title add follow=yes to my.cnf protect task, incase its a symlink. fix #20 add follow=yes to my.cnf protect task, incase its a symlink. #20 Oct 8, 2016
@rndmh3ro rndmh3ro changed the title add follow=yes to my.cnf protect task, incase its a symlink. #20 add follow=yes to my.cnf protect task, incase its a symlink. fixes #20 Oct 8, 2016
@fitz123
Copy link
Contributor

fitz123 commented Oct 8, 2016

@rndmh3ro Not sure how safe it is.
Did you test and confirm role fully works with both my.cnf as a symlink and a real file (for example permissions set right)? If so I see no issues to merge.

@rndmh3ro
Copy link
Member Author

rndmh3ro commented Oct 9, 2016

That's safe, I use it all the time.
The "follow" really means follow in this case, so when you set the perms to 600 and the destination is a symlink, then not the symlink gets changed but the target of the symlink.

So in the case mentioned in the issue:

andrej@vagrant:~$ ls -lah /etc/mysql/my.cnf
lrwxrwxrwx 1 root root 24 Oct 8 04:42 /etc/mysql/my.cnf -> /etc/alternatives/my.cnf

/etc/alternatives/my.cnf will have perms 600.

@fitz123 fitz123 merged commit b6a9c11 into dev-sec:master Oct 11, 2016
@rndmh3ro rndmh3ro deleted the add_follow branch November 21, 2016 18:32
No Sign up for free to subscribe to this conversation on GitHub. Already have an account? No Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants