Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
Linux
Description
When deploying a site via scpexe protocol then Maven executes this command after uploading the files:
chmod -Rf g+w,a+rX /somepath
The target directory on the server does not belong to the user uploading the files. The user has write permissions, but he is not the owner. And this means that chmod fails. It displays no error message because of the -f parameter but it returns an exit code 1 which is processed by Maven. The result is the attached error message.
When I change the owner of the target directory then it works but we can't do this because we have multiple SSH users uploading the files. The permissions are already correct on the server (They are handled by ACLs) so there is no need to call chmod at all. So I suggest to let the user configure if chmod is executed at all or to ignore the return value of chmod (If you already use -f to hide error messages then you are most likely not interested in errors so also ignoring the error code smells fine)