Create symlink from different user


I need to create symlink from user folder to site/.

We have created new user ftp_user with ftp_group, so it have /home/ftp_user directory. And now I need to link that onto project /site/folder-name.

  • name: Create symlinks
    src: “{{ deploy_helper.new_release_path }}/folder-name”
    path: “/home/ftp_user”
    state: link

But that’s not working, as I think it’s because “web” user have no rights to “/home/ftp_user”.
How I can add “web” user to have an access to that folder, or how this should be done in other proper way?

The deal is to have sftp user with access to only one folder, where they upload files, which I can access from the app.

Thanks you!

refusing to convert from directory to symlink for
fatal: []: FAILED! => {“changed”: false, “gid”: 33, “group”: “www-data”, “mode”: “0777”, “owner”: “web”, “path”: “/srv/www/”, “size”: 4096, “state”: “directory”, “uid”: 1001}

This topic was automatically closed after 42 days. New replies are no longer allowed.