You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem in chmod_unless_link in the cleanup script is that chmod -R u+w "$1" is trying to change the mode for the user, but in multi-user mode the user is root, and the permission needs to be set on the group instead. It doesn't affect the return code so the failure is more of a misleading warning, but it would be nice if it actually fixed the right permission for multi-user mode.
The text was updated successfully, but these errors were encountered:
After doing a fresh rvmsudo rvm get master (because of #4356), I tried rvm cleanup all, and I got a bunch of more errors:
Cleaning up rvm archives
chmod: changing permissions of `/usr/local/rvm/user/md5': Operation not permitted
- failed emptying /usr/local/rvm/user/md5 - please check ownership and permissions
chmod: changing permissions of `/usr/local/rvm/user/sha512': Operation not permitted
- failed emptying /usr/local/rvm/user/sha512 - please check ownership and permissions
chmod: changing permissions of `/usr/local/rvm/archives/rvm-installer': Operation not permitted
- failed removing /usr/local/rvm/archives/rvm-installer - please check ownership and permissions
chmod: changing permissions of `/usr/local/rvm/archives/rvm-installer.asc': Operation not permitted
- failed removing /usr/local/rvm/archives/rvm-installer.asc - please check ownership and permissions
chmod: changing permissions of `/usr/local/rvm/archives/rvm-master.tgz': Operation not permitted
- failed removing /usr/local/rvm/archives/rvm-master.tgz - please check ownership and permissions
and then every file in "/usr/local/rvm/src/rvm/".
Looks like remove_or_log calls chmod_unless_link too, so the other cleanup functions are also affected. It doesn't matter if things were already clean.
BrianHawley
changed the title
Multi-user rvm cleanup archives fails without rvmsudo
Multi-user rvm cleanup fails without rvmsudo
Apr 17, 2018
Description
Getting failures running
rvm cleanup archives
or during the archives phase ofrvm cleanup all
.Steps to reproduce
For multi-user installed rvm:
Expected behavior
Actual behavior
Environment info
Only info needed here, the
ls -l
command for the directory:The problem in
chmod_unless_link
in the cleanup script is thatchmod -R u+w "$1"
is trying to change the mode for the user, but in multi-user mode the user is root, and the permission needs to be set on the group instead. It doesn't affect the return code so the failure is more of a misleading warning, but it would be nice if it actually fixed the right permission for multi-user mode.The text was updated successfully, but these errors were encountered: