-4

There is this problem with my newly created user with "root" privilages in my web server Ubuntu LTS 12.04 .

I follow the rule:

adduser newuser

usermod -a -G sudo newuser

then I add in visudo

# User privilege specification
root    ALL=(ALL:ALL) ALL
newuser    ALL=(ALL:ALL) ALL

this user is not doing well I only want to access to this this folder:

/sites

And I can't see the contente via sftp or terminal.

do I jump one more step?

thanks

Locke
  • 5
  • 5

1 Answers1

4

This doesn't work like that. sudo gives a user extended rights if they are requested by calling sudo, but you don't have those rights otherwise, and certainly not when connecting to a share via SFTP.

What would work is e.g. sudo ls -l /sites, or sudo cp file /sites etc., but this isn't possible in a SFTP session.

Read up on how sudo works.

Sven
  • 98,649
  • 14
  • 180
  • 226
  • Thanks a lot for the explanation, seems that here, this kind of questions are punished... there is no place for those who are not experts ... – Locke Apr 06 '14 at 05:15
  • @Locke: There is a whole network of sites on [SE] where this question would have a much better fit, like [SU] and [unix.se]. [SF] is for pro admins *only* and we make that crystal clear. You chose to ignore this. See the [help] for more informations. – Sven Apr 06 '14 at 10:25