Nope, that's super bad. I thought you didn't have root access? On 22 July 2017 at 13:06, Yuriy Buha <[email protected]> wrote: > Hi Fayad. > > Thank you for the quick reply. > I tried to create the file in user's home directory, and then move to the > /etc, but then i would get a permission error moving the file to that > directory. > It worked after i changed the ownership of /etc from root to the user, but > i'm not sure if that's a proper way to do. Is it ok for the /etc directory > to be owned by the user but not root? > > thank you > > On Friday, July 21, 2017 at 9:38:49 AM UTC-4, Fayad wrote: >> >> Try these options >> >> Copy the file to the sudo user's home directory or any other directory >> where the user has got permission. >> >> Or >> >> Increase the permissions of the destination directory so that user can >> write into that directory. >> >> >> >> Fayad >> >> Sent from my OnePlus One >> >> On 21-Jul-2017 6:33 PM, "Yuriy Buha" <[email protected]> wrote: >>> >>> Hello. >>> >>> I have similar case, and i get this error, but i do need to create it as >>> sudo user. I do not have root privilege. >>> Can someone please advise? >>> >>> Thank you >>> >>> On Friday, May 6, 2016 at 11:44:08 AM UTC-4, Kai Stian Olstad wrote: >>>> >>>> On 06. May 2016 14:46, Sanjay Kumar wrote: >>>> > I am not able copy to remote host, getting not writable error, my >>>> > playbook >>>> > is here. >>>> > >>>> > --- >>>> > - hosts: all >>>> > become: yes >>>> > become_user: sanjay >>>> > become_method: sudo >>>> > tasks: >>>> > - name: copy some file >>>> > copy: src=/home/sanjay/messages dest=/etc >>>> >>>> become_user: sanjay, means Ansible will do a sudo to user sanjay. So >>>> sanjay need permission to the destination. >>>> >>>> I guess what you really want is become_user: root , which is the >>>> default. >>>> >>>> -- >>>> Kai Stian Olstad >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ansible-project/d2d870d5-5ff6-4503-9096-0e4a183ae6eb%40googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/78612bcc-e25c-4ee5-9dd0-d5e833a3a696%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK5eLPTD6FK4Z5V58Wxv-dYjVfQ9BfvzWSRoLtYHJyOpjivf5A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
