I have a few areas you could look in, but I'd like to know what platform this is on. I can see the Linux tag, but no mention of a distro.
–
BratchleyJul 2 '13 at 20:56

@JoelDavis:I think it is suse. But not 100% sure as I connect via ssh and can not check right now
–
JimJul 2 '13 at 21:01

cat /etc/SuSE-release should tell you the exact version of SuSE (after which it would probably be a good idea to update the original question with that info)
–
BratchleyJul 2 '13 at 21:03

I think DavidG and I misunderstood the question. At first I thought you were saying that merely running the command through sudo causes it to work for the same account, but now I'm seeing a different type of question. Are you just asking how sudo does what it does and not running into an error?
–
BratchleyJul 2 '13 at 21:09

@JoelDavis:I know that with sudo you can run as another user.I can not understand how in this particular case it works
–
JimJul 2 '13 at 21:17

2 Answers
2

Just because you have the ability to act as another user, this does not give your current user the same permissions. Permissions do not cascade to your current user based on the ability of your current user account to act as another user. sudo and su allow you to "become" or "act as" another user. In other words, when you sudo you are actually becoming that user for a moment.

Even if you log into the machine as root and then sudo or su to another user, as that user you will have all the same restrictions (and permission) because to the system you are that user, not root.