Trying to give user access to the home directory

Hey Team,

I am running RedHat and SFTP, within that server I have user/SFTP accounts. I need give a few users full access to this directory only (The Home Dir not his home). he needs to move files and then deposit files at will.
But I don't want to give him full root access to the entire server.

Could I just create a Group? then assign that user and then the Home directory to that group?
Then in the future if I need to give more people access to the folder just create a user and then add them to that group?

Also any snytax on how to create this would be most helpful

Thanks
NetNinjaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

modcon_jscottCommented:
I would not give anyone outside of root access to the /home directory, this is not very secure.

A better solution would be to create another directory for the sftp user account and add the users to the group which owns this directory.  Then on your end you can create a cron that looks for changed files in this directory and do whatever you want with them.

These commands might help a bit:

mkdir /home/newuser
cd /home/newuser
umask 007 .
chown -R newuser:usergroup /home/newuser
chmod -R g+rwx /home/newuser

Once you have the directory set up, you can modify the SFTP config file to point this user to this new directory when they log in.
ProFTPd - http://gentoo-wiki.com/HOWTO_ProFTPD or
http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-ConfigFile.html


hope this helps....
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
http:// thevpn.guruCommented:
Could I just create a Group? then assign that user and then the Home directory to that group?
yes that would work..you would also need to chgrp the home dir
0
modcon_jscottCommented:
yes you can just create the group, but if you are going this far why not just give them root access anyway. This new user and all users who are part of this new group will be able to do what they please below /home

You could use sudo to control what commands this user can and cant run.

http://en.wikipedia.org/wiki/Sudo


Yes the group thing will work.  Unless you trust this user as much as you trust yourself, I would use a script based solution in conjunction with configuring your, hopefully jailed, FTP server.
0
NetNinjaAuthor Commented:
Thanks for your time.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.