0

I want to create a user on debian which can do following:

  1. Login via SSH.
  2. Create SVN repo and create post-commit hook.
  3. chmod and chown another directory to apache and 777.

How I can achieve that? As far as I see I have several tasks to deal with:

  1. Create user
  2. Enable SSH login for it.
  3. Restrict it's access to several directories and files.
  4. Restrict it's access to several commands.
1
  • 3
    You really don't want to chmod 777 anything that apache touches.
    – user9517
    May 10, 2012 at 6:36

1 Answer 1

3

I would suggest providing more details for a better answer however...

New users have ssh access by default if you use 'adduser'( vs useradd) and fill in the answers. From there you can change the home directory for the user in /etc/passwd . This is assuming you haven't customized your sshd_config file.

As for chowning, I believe your going to need give access to a script or the like via sudoers. I don't believe users can set the OWNER of a file to something other than themselves. Only root.

Limiting commands? Check this https://stackoverflow.com/questions/402615/how-to-restrict-ssh-users-to-a-predefined-set-of-commands-after-login . Other options include rbash, chroot, etc.

1
  • Ok. TY. This seems to be what I was looking for. May 10, 2012 at 6:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .