I am running a script to deploy a website on a server. It gives me the following error:
DEBUG [4223cc8a] Command: /usr/bin/env chmod +x /tmp/mysite_staging/git-ssh.sh
DEBUG [4223cc8a] changing permissions of `/tmp/mysite_staging/git-ssh.sh'
DEBUG [4223cc8a] : Operation not permitted
It is complaining that the deploy user cannot change permission of that file. I already have set it so that the deploy user can read,write,execute the file, as the user is in the deploy group:
$ ls -l
-rwxrwx--x. 1 root deploy 93 Aug 5 09:22 git-ssh.sh
So how can I enable the deploy user to change the permission of this file? This is on CentOS. My temporary solution was to make the deploy user the owner of the file.