For some reason an Ubuntu server (14.04.4 LTS) I'm working on will not allow "man" to be run by regular user. Example:
man ls
man: can't change directory to '/root': Permission denied
man: command exited with status 255: (cd /root && LESS=-ix8RmPm Manual page ls(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page ls(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$ MAN_PN=ls(1) pager -s)
How might this have happened and more importantly how can I fix it?
UPDATE:
Seems this only occurs after I su user
where "user" is a non privileged user. Workaround is to su -l user
but I still don't understand why man
would become a privileged command without the login flag.
type -a man
?man is /usr/bin/man
echo $MANPATH
?echo $MANPAGER
andecho $PAGER
(whensu
'd touser
)?