On 15. sep. 2016 14:10, Алексей Гуносов wrote:
> Hello.
> I have a server with Ubuntu Server 16.04.1. I test some ansible features on
> it from my desktop with Ubuntu 16.04.1.
> So I have system user "www-data" for Apache with uid=33(www-data)
> gid=33(www-data) groups=33(www-data).
> I have directory /var/www/html/wordpress that I want to set permissions to
> the system user/group "www-data".
> I write that in playbook:
> file: path=/var/www/html/wordpress owner=www-data group=www-data mode=775
> state=directory recurse=yes
Mode should always start with a 0 since it's a octal.
To change the owner and group you need to be root to allow that.
> So when I check the permissions of directory /var/www/html/wordpress I see
> that the owner is "1001" and group is "1001". But I haven't the user and
> group with uid and gid 1001. And this is the problem.
> What can I do?
Since you have provided little information about how you run this it's
hard for people to help. Which user are you using, are you using become,
what is the output of ansible-playbook -vvvv <your playbook>
--
Kai Stian Olstad