0

I am trying to find out how to create ssh users that can work inside my sites directories but not have complete access except for the folders I specify.

The only issue is that I need the sub-users not to create privledge issues. It's like I want a site owner to act like root when it deals with anything in his site folder, created by him or the other workers.

Any suggestions on a stable solution?

Thanks

4
  • did you look at chroot environments? Apr 24, 2012 at 17:17
  • not really needing that much. the problem I am having now is that I created a home directory for the user, then created links to the folders I want them to have. The problem is they are writing with permission +755 and permission denied when I try to overwrite. Apr 24, 2012 at 18:42
  • 1
    Have you considered using ACLs?
    – fpmurphy
    Apr 24, 2012 at 22:14
  • have you check into groups, setuid (in directories) or, for changing the permission, changing the umask for those users ?
    – Feiticeir0
    Apr 25, 2012 at 10:17

1 Answer 1

1

Make the primary group the same for all of these users

usermod -g users user1
usermod -g users user2
# (etc)

Set the umask for each user to 0002

echo 'umask 0002' >> ~user1/.bashrc
echo 'umask 0002' >> ~user2/.bashrc
# (etc)

Change ownership of files in existing shared directories

find /dat -exec chgrp -R users * \;
find /dat -exec chmod -R g+w * \;

Now, files will be created with group "users" and mode 0775. Your users can overwrite each others files.

You must log in to answer this question.

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