# Symbolic link to a directory created with a role task file with owner attribute is not accessible to root user

**URL:** <https://forum.ansible.com/t/symbolic-link-to-a-directory-created-with-a-role-task-file-with-owner-attribute-is-not-accessible-to-root-user/20482>\
**Category:** Ansible Project\
**Created:** [February 8, 2016, 9:48am UTC](https://forum.ansible.com/t/symbolic-link-to-a-directory-created-with-a-role-task-file-with-owner-attribute-is-not-accessible-to-root-user/20482 "2016-02-08T09:48:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atanas\_Dichev](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Atanas\_Dichev](https://forum.ansible.com/u/Atanas_Dichev)\
**Post date:** [February 8, 2016, 9:48am UTC](https://forum.ansible.com/t/symbolic-link-to-a-directory-created-with-a-role-task-file-with-owner-attribute-is-not-accessible-to-root-user/20482/1 "2016-02-08T09:48:30Z")

</div>

Hi,  
My ansible version is:  
ansible 2.1.0 (devel [`a584ab3`](https://github.com/ansible/ansible/commit/a584ab34200f634694724175552a2307ae3bd80e)) last updated 2016/02/02 12:07:20 (GMT +300)  
I have a defined role with a tasks file which includes creation of a symbolic link to a directory with owner and group attributes set to a specific user. When I execute the playbook, the symlink is created but I cannot access it with root user. The issue does not appear when I create it with an ad-hoc command. What is wrong with my setup?  
role’s vars:

```auto
ansible_user: root

service_name: tomcat

install_dir: /tmp

major_version: 8

full_version: "{{ major_version }}.0.30"

```

the task in the role’s tasks file:

```auto
  - name: Create symlink tomcat home dir

    file:

      path: "{{ install_dir }}/tomcat"

      src: "{{ install_dir }}/apache-tomcat-{{ full_version }}"

      state: link

      owner: tomcat

      group: tomcat

```

```auto
root@system# cd /tmp/tomcat
-bash: cd: /tmp/tomcat: Permission denied

```

---

<div class="post-metadata">

**Author:** ![Atanas\_Dichev](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Atanas\_Dichev](https://forum.ansible.com/u/Atanas_Dichev)\
**Post date:** [February 15, 2016, 2:54pm UTC](https://forum.ansible.com/t/symbolic-link-to-a-directory-created-with-a-role-task-file-with-owner-attribute-is-not-accessible-to-root-user/20482/2 "2016-02-15T14:54:11Z")

</div>

Has anyone faced this issue ?
