Article 5Q3DT sudo command requires full path to files being viewed

sudo command requires full path to files being viewed

by
awreneau
from LinuxQuestions.org on (#5Q3DT)
End-user needs access to files owned by root, log files. End user successfully views files w/

Code:sudo less /path/to/filebut cannot view the same file when in the /path/to directory i.e.
Code:pwd
/path/to
sudo less fileThey're hit with the 'permission denied' error.

Out of habit user cd to /path/to and looks at datestamp of file to determine which file(s) they need to review and ideally using sudo less followed by the file name would be ideal.

Suggestions?

Thxlatest?d=yIl2AUoC8zA latest?i=-_AvmoC1XLw:o_95CCqQ51M:F7zBnMy latest?i=-_AvmoC1XLw:o_95CCqQ51M:V_sGLiP latest?d=qj6IDK7rITs latest?i=-_AvmoC1XLw:o_95CCqQ51M:gIN9vFw-_AvmoC1XLw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments