0

I have an aws ec2 instance and I am trying to setup github action. My action is not able to sync. The error I get is

Warning: Permanently added 'XXXXXXXXXX.compute.amazonaws.com,XX.X.XX.XX' (ECDSA) to the list of known hosts.
sending incremental file list
rsync: failed to set times on "/var/www/html/wp-content/themes/XXX-theme/.": Operation not permitted (1)
./
rsync: failed to set times on "/var/www/html/wp-content/themes/XXX-theme/.editorconfig": Operation not permitted (1)
rsync: failed to set times on "/var/www/html/wp-content/themes/XXX-theme/.eslintrc.js": Operation not permitted (1)
rsync: failed to set times on "/var/www/html/wp-content/themes/XXX-theme/.gitignore": Operation not permitted (1)
rsync: failed to set times on "/var/www/html/wp-content/themes/XXX-theme/.stylelintrc.js": Operation not permitted (1)

I used WordPress with LiteSpeed Cache (Powered OpenLiteSpeed) to create the instance.

This is what my permission looks like.

total 220
-rw-r--r--  1 www-data www-data   405 Sep 20 05:19 index.php
-rw-r--r--  1 www-data www-data 19915 Sep 20 05:19 license.txt
-rw-r--r--  1 www-data www-data  7346 Sep 20 05:19 readme.html
-rw-r--r--  1 www-data www-data   206 Sep 20 05:19 robots.txt
-rw-r--r--  1 www-data www-data  7165 Sep 20 05:19 wp-activate.php
drwxr-xr-x  9 www-data www-data  4096 Sep 20 05:19 wp-admin
-rw-r--r--  1 www-data www-data   351 Sep 20 05:19 wp-blog-header.php
-rw-r--r--  1 www-data www-data  2328 Sep 20 05:19 wp-comments-post.php
-rw-r--r--  1 www-data www-data  3004 Sep 20 05:19 wp-config-sample.php
-rw-r--r--  1 www-data www-data  3374 Sep 20 05:19 wp-config.php
drwxr-xr-x 10 www-data www-data  4096 Sep 23 04:51 wp-content
-rw-r--r--  1 www-data www-data  3939 Sep 20 05:19 wp-cron.php
drwxr-xr-x 25 www-data www-data 12288 Sep 20 05:19 wp-includes
-rw-r--r--  1 www-data www-data  2496 Sep 20 05:19 wp-links-opml.php
-rw-r--r--  1 www-data www-data  3900 Sep 20 05:19 wp-load.php
-rw-r--r--  1 www-data www-data 45463 Sep 20 05:19 wp-login.php
-rw-r--r--  1 www-data www-data  8509 Sep 20 05:19 wp-mail.php
-rw-r--r--  1 www-data www-data 22297 Sep 20 05:19 wp-settings.php
-rw-r--r--  1 www-data www-data 31693 Sep 20 05:19 wp-signup.php
-rw-r--r--  1 www-data www-data  4747 Sep 20 05:19 wp-trackback.php
-rw-r--r--  1 www-data www-data  3236 Sep 20 05:19 xmlrpc.php

I am using user ubuntu to rsync my wordpress theme. Theme also has www-data as user group.

bhanu
  • 101
  • 1
  • Please post the permissions for /var/www/html/wp-content/themes/XXX-theme *directory* itself, as well as for any of the mentioned files, e.g. /var/www/html/wp-content/themes/XXX-theme/.editorconfig – Alex Sep 23 '21 at 18:07

1 Answers1

0

You need to have permission for writing to the folders/files to use rsync. In your case the owner of the file and folder is www-data but I don't think you are logged in as www-data. So you need give permission example use chmod 77x to the user(and add it to the www-data group) or give it sudoer.