Originally Posted by DaftDave
Have been trying to access a certain file on my computer as an ordinary user and was denied access. So i opened a terminal and typed:
sudo su /var/log/user.log pressed Enter and typed in my root password and was still denied access.
So i then tried typing:
su /var/log/user.log pressed enter and then typed my root password but once again was denied access.
Would someone please tell me just what i am doing wrong please. I am running PCLinuxOS. Thanks all
I'm not sure what you are trying to do with the file in question, but the commands you have been issuing indicate you are wanting to execute the file. I'm fairly certain that's not what you intend to do. Let me make some suggestions.
sudo more /var/log/user.log
That will show you the contents of the file a page at a time. Note that you said you entered the root password. Sudo requires your user password but it still might not work if you are not in the sudousers file.
Typing "su /var/log/user.log" is telling the system you want to switch user to /var/log/user.log and I am not surprised that didn't work.
If you are not in the sudousers list, then try this:
<enter the root password when asked for a password>
Substitute your favorite editor for "more" to gain more flexibility in viewing the file.
I hope that helps.