Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A quick question on user management in Ubuntu 10.04.

I encounter the following practice in some deployment script for web server:

mkdir /home/www-data
cd /home/www-data
wget http://somesite.com/static/some_package.zip
unzip some_package.zip
rm some_package.zip
chown -R www-data:www-data some_package

It seems to me that no user/group has been explicitly created as 'www-data', unless the chown command does that? If so, does that mean that I can run stuff inside /home/www-data/ as user 'www-data' in some server start-up script? Or do I need to do extra permission configurations?

share|improve this question

2 Answers 2

Try this AskUbuntu question : Set default owner/user

share|improve this answer
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Ivo Flipse Jul 15 '12 at 21:00

On Debian-based systems, the user and group www-data are usually created at installation time, for use by web servers.

If they didn't exist, chown wouldn't create them – it would display an error message instead.

share|improve this answer
    
thanks for the clarification. one more thing, do I need to use chown to change the ownership of every time I copy a package/folder to /home/www-data/ when I deploy? –  MLister Jun 17 '12 at 17:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.