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
Ubuntu's sudo preserves the value of $HOME. After a sudo rlwrap xxxxxxs history file will be owned by root, so that a subsequent invocation of rlwrap as the original user will fail with rlwrap: cannot read and write /home/user/.xxx_history: Permission denied
My first reaction would be that this is a screw-up by Ubuntu. But how do other programs avoid the problem (if at all)?
Note: the preserving of $HOME is the default under Ubuntu (they apply a special patch to sudo) but can be specified in /etc/sudoers on any system. Hence, it is not 100% fair to call this an Ubuntu problem. But I do feel that any user that messes with env_keep in /etc/sudoers can be expected to know what she is doing, while unsuspecting Ubuntu users likely will be flummoxed by this error.
In the meantime, the problem can be avoided by adding the user name to the history file name:
See this question on Stack Overflow
Ubuntu's
sudo
preserves the value of$HOME
. After asudo rlwrap xxx
xxx
s history file will be owned by root, so that a subsequent invocation ofrlwrap
as the original user will fail withrlwrap: cannot read and write /home/user/.xxx_history: Permission denied
My first reaction would be that this is a screw-up by Ubuntu. But how do other programs avoid the problem (if at all)?
Note: the preserving of
$HOME
is the default under Ubuntu (they apply a special patch tosudo
) but can be specified in/etc/sudoers
on any system. Hence, it is not 100% fair to call this an Ubuntu problem. But I do feel that any user that messes withenv_keep
in/etc/sudoers
can be expected to know what she is doing, while unsuspecting Ubuntu users likely will be flummoxed by this error.In the meantime, the problem can be avoided by adding the user name to the history file name:
The text was updated successfully, but these errors were encountered: