Linux user creation


I want to create a user for my colleague:
- he would use putty to log in
- he should be able to see only the var/www/ directory but in this he should be able to create, delete folders and files
- he should be able to give the command chmod for the different directories in the www directory

Please write me step by step what to do. Thank you
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.

1.  Create the user

useradd USERID
replace USERID with the id you would want.

2.  Give permission for chmod
setfacl -R -m u:USERID:rwx /var/www

3.  Create a password for the user
passwd USERID

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
starhuAuthor Commented:
I got the message:
The program 'setfacl' is currently not installed.  You can install it by typing:                                                                                                                              
apt-get install acl                                                                                                                                                                                            
Then I tried:
apt-get intall acl

The error:Invalid operation install
Looking like your Linux release is pretty old one.

You would be better off trying to do this by giving sudo access

Would you consider giving user access to become root temporarily?

The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Did you try you apt-get command as root or used sudo?

sudo apt-get install acl
starhuAuthor Commented:
sudo helped.

After giving setfacl -R -m u:USERID:rwx /var/www command I got a lot of lines like these:

setfacl: /var/www/ideig/eteszt: Operation not supported                        
 setfacl: /var/www/ideig/eteszt/class.phpmailer.php: Operation not supported    
 setfacl: /var/www/ideig/eteszt/mail.php: Operation not supported                
 setfacl: /var/www/ideig/eteszt/class.smtp.php: Operation not supported          

Is this normal?
It is not normal.

USERID should be substituted for the actual user ID.

Use sudo again.

sudo setfacl -R -m u:USERID:rwx /var/www
starhuAuthor Commented:
I did sudo setfacl -R -m u:USERID:rwx /var/www and of course I changed Userid to the actual user id.

The messages were the same - however when I used putty with the new user at first glance everything seemed right: I could delete files, create directories and copy fileslll
Good.  Anything else?
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 Security

From novice to tech pro — start learning today.